Classes
Folder
Folder
Represents a Folder (directory) entity on the file system.
Summary β
Constructors
Properties
Methods
Constructors β
constructor β
new Folder(): Folder
inherited from constructor
Returns Folder
Properties β
isKnown β
Determines whether this instance is a KnownFolder (accessed through the KnownFolders object).
Methods β
clear β
Deletes all the files and folders (recursively), contained within this Folder.
Returns Promise<any>
clearSync β
Deletes all the files and folders (recursively), contained within this Folder synchronously.
Parameter Default Description
onError
(error: any) => void
An optional function to be called if some error occurs.
Returns void
contains β
Checks whether this Folder contains an Entity with the specified name.
The path of the folder is added to the name to resolve the complete path to check for.
Parameter Default Description
name
string
The name of the entity to check for.
Returns boolean
eachEntity β
eachEntity(onEntity: (entity: FileSystemEntity) => boolean): any
Enumerates all the top-level FileSystem entities residing within this folder.
Parameter Default Description
onEntity
(entity: FileSystemEntity) => boolean
A callback that receives the current entity. If the callback returns false this will mean for the iteration to stop.
Returns any
getEntities β
getEntities(): Promise<FileSystemEntity[]>
Gets all the top-level entities residing within this folder.
Returns Promise<FileSystemEntity[]>
getEntitiesSync β
getEntitiesSync(onError?: (error: any) => any): FileSystemEntity[]
Gets all the top-level entities residing within this folder synchronously.
Parameter Default Description
onError
(error: any) => any
An optional function to be called if some error occurs.
Returns FileSystemEntity[]
getFile β
getFolder β
exists β
Static
Checks whether a Folder with the specified path already exists.
Parameter Default Description
path
string
The path to check for.
Returns boolean
- Previous
- FlexboxLayout
- Next
- Font