Skip to content

file.parent

JoeStrout edited this page Sep 11, 2026 · 3 revisions

Get the parent directory of the given path

Parameters

Parameter Default Value Note
path

Return value

Condition Return Value
(always) string

Notes

Example

import "file"
print file.parent("/home/user/docs/report.txt")   // "/home/user/docs"

Clone this wiki locally