Skip to content

Folder

Folder · Type

NameTypeDescription
basenamestringThe last part of the path.
childrenFile[]The same as contents.
contentsFile[]What is in the folder, one level down.
deletedboolTrue when it has been deleted.
dirnamestringThe path of the folder that holds it.
display_namestringThe name without its extension.
eventsboolWhether changes made through this file raise Foldr events. Assign false to stop them.
extensionstringThe extension without the dot, or an empty string.
hiddenboolTrue when the storage marks it hidden.
is_dirboolTrue for a folder, false for a file.
is_movedboolTrue when this event moved or renamed it.
is_newboolTrue when this event created it.
is_updatedboolTrue when this event changed it.
listing_was_maxedboolTrue when the listing stopped at the storage’s limit, so contents is not everything.
mimetypestringThe MIME type, such as application/pdf. A folder has none.
modifiedDateWhen it was last changed. Assigning a date sets it on storage that allows that.
namestringThe name with its extension. Assigning a new string renames the file or folder.
nice_pathstringThe path as people see it in Foldr. It differs from path only on storage whose own paths are not readable (an id-based store, say).
nice_uristringThe same address built from nice_path.
parentFolderThe folder that holds it, or null at the top of the share.
pathstringThe path inside the share.
search_uristringThe address search knows it by. It ends in /* to match everything below the folder.
shareShareThe share it lives on.
sizeintThe size in bytes. A folder is 0.
uristringThe share and the path together, as one address.
userUserThe account it was opened as.
vendor_idstringThe id the storage gives it (Google Drive, OneDrive, Box and similar), when it has one.
folder.childrenComplete() → bool

No description yet.

folder.delete()

No description yet.

folder.duplicate(destination?: File, sourceVersion?: string)

No description yet.

folder.get(path: string)

No description yet.

folder.getContents() → iterable

No description yet.

folder.getName() → string

No description yet.

folder.getParent() → File

No description yet.

folder.getPath() → string

No description yet.

folder.getShare() → Share

No description yet.

folder.getUser() → User

No description yet.

folder.hasStatus(status: FileStatus) → bool

No description yet.

folder.in(folders?: File) → bool

No description yet.

folder.is(file: File) → bool

No description yet.

folder.isDeleted() → bool

No description yet.

folder.isDir() → bool

No description yet.

folder.isMoved() → bool

No description yet.

folder.isNew() → bool

No description yet.

folder.isUpdated() → bool

No description yet.

folder.isZip() → bool

No description yet.

folder.make(path: Stringable, asDir?: bool = false, suggest?: bool = false, force?: bool = false) → File

No description yet.

folder.move(destination: Folder, suggest?: bool = false) → bool

No description yet.

folder.refresh()

No description yet.

folder.release()

No description yet.

folder.rename(newName: string) → bool

No description yet.

folder.reserve(ttl?: mixed = 10)

No description yet.

folder.setUser(user?: mixed)

The user this file is opened as: what sharing, permissions and activity act as. Takes a user, a MaSH user (file.setUser(owner)) or a GUID; null clears it. A script giving an event file a user so it can share it is the case this is called from MaSH for.

folder.triggerEvents()

No description yet.

folder.write(args?: mixed) → Document

No description yet.