Skip to content

Directory

An object representing a file directory.


properties

Path : string

The absolute path to the directory.

Created : DateTime

The time the directory was created.

Accessed : DateTime

The time the directory was accessed.

Modified : DateTime

The time the directory was modified.

Exists : boolean

Whether or not the directory exists yet.


methods

Make -> File

Directory:Make() : File

Creates a file directory where the directory object's path is located.

Move -> File

Directory:Move(path: string) : File

Moves the directory to a different location.

Delete -> ()

Directory:Delete() : ()

Deletes the file directory and all files inside it.

Walk -> () -> File | Directory

Directory:Walk() : () -> File | Directory

Returns an non recursive iterator that walks through every file and directory in that directory.


metamethods

__tostring -> string

Converts the file into a string in the format directory [Path]