Need help?
Ask a question or report a problem on GitHub.
Open an issue
File and folder objects
A discovered file or folder is an object with properties you read with of.
File Objects
A discovered file is an object.
Common file properties include:
Otter
say name of file say path of file say extension of file say size of file say created of file say modified of file
Example:
Otter
get files in "Pictures" into files for each file in files say name of file say extension of file say size of file .
File operations may accept either a path or a file object.
Path:
Otter
move "photo.jpg" to "Pictures"
Object:
Otter
move file to "Pictures"
Folder Objects
A discovered folder is also an object.
Folder properties include:
Otter
say name of folder say path of folder say created of folder say modified of folder
A folder does not expose:
Otter
say size of folder
as a normal property.
Determining the total size of a folder may require recursively examining many files and subfolders.
Otter should not hide an expensive operation behind a property that appears inexpensive.