Folder
Folder · Type
Properties
Section titled “Properties”| Name | Type | Description |
|---|---|---|
basename | string | The last part of the path. |
children | File[] | The same as contents. |
contents | File[] | What is in the folder, one level down. |
deleted | bool | True when it has been deleted. |
dirname | string | The path of the folder that holds it. |
display_name | string | The name without its extension. |
events | bool | Whether changes made through this file raise Foldr events. Assign false to stop them. |
extension | string | The extension without the dot, or an empty string. |
hidden | bool | True when the storage marks it hidden. |
is_dir | bool | True for a folder, false for a file. |
is_moved | bool | True when this event moved or renamed it. |
is_new | bool | True when this event created it. |
is_updated | bool | True when this event changed it. |
listing_was_maxed | bool | True when the listing stopped at the storage’s limit, so contents is not everything. |
mimetype | string | The MIME type, such as application/pdf. A folder has none. |
modified | Date | When it was last changed. Assigning a date sets it on storage that allows that. |
name | string | The name with its extension. Assigning a new string renames the file or folder. |
nice_path | string | The 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_uri | string | The same address built from nice_path. |
parent | Folder | The folder that holds it, or null at the top of the share. |
path | string | The path inside the share. |
search_uri | string | The address search knows it by. It ends in /* to match everything below the folder. |
share | Share | The share it lives on. |
size | int | The size in bytes. A folder is 0. |
uri | string | The share and the path together, as one address. |
user | User | The account it was opened as. |
vendor_id | string | The id the storage gives it (Google Drive, OneDrive, Box and similar), when it has one. |
Methods
Section titled “Methods”childrenComplete
Section titled “childrenComplete”folder.childrenComplete() → bool
No description yet.
delete
Section titled “delete”folder.delete()
No description yet.
duplicate
Section titled “duplicate”folder.duplicate(destination?: File, sourceVersion?: string)
No description yet.
folder.get(path: string)
No description yet.
getContents
Section titled “getContents”folder.getContents() → iterable
No description yet.
getName
Section titled “getName”folder.getName() → string
No description yet.
getParent
Section titled “getParent”folder.getParent() → File
No description yet.
getPath
Section titled “getPath”folder.getPath() → string
No description yet.
getShare
Section titled “getShare”folder.getShare() → Share
No description yet.
getUser
Section titled “getUser”folder.getUser() → User
No description yet.
hasStatus
Section titled “hasStatus”folder.hasStatus(status: FileStatus) → bool
No description yet.
folder.in(folders?: File) → bool
No description yet.
folder.is(file: File) → bool
No description yet.
isDeleted
Section titled “isDeleted”folder.isDeleted() → bool
No description yet.
folder.isDir() → bool
No description yet.
isMoved
Section titled “isMoved”folder.isMoved() → bool
No description yet.
folder.isNew() → bool
No description yet.
isUpdated
Section titled “isUpdated”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.
refresh
Section titled “refresh”folder.refresh()
No description yet.
release
Section titled “release”folder.release()
No description yet.
rename
Section titled “rename”folder.rename(newName: string) → bool
No description yet.
reserve
Section titled “reserve”folder.reserve(ttl?: mixed = 10)
No description yet.
setUser
Section titled “setUser”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.
triggerEvents
Section titled “triggerEvents”folder.triggerEvents()
No description yet.
folder.write(args?: mixed) → Document
No description yet.