Classes
File
File
Represents a File entity on the file system.
Summary
Constructors
Properties
Constructors
constructor
new File(): File
inherited from constructor
Returns File
Properties
extension
Gets the extension of the file.
isLocked
Gets a value indicating whether the file is currently locked, meaning a background operation associated with this file is running.
size
Gets the size in bytes of the file.
android
StaticReadonly
ios
StaticReadonly
Methods
append
Appends the provided binary content to the file.
Returns Promise<void>
appendSync
Appends the provided binary content to the file synchronously.
Returns void
appendText
Appends the provided string to the file, using the specified encoding (defaults to UTF-8).
Returns Promise<any>
appendTextSync
Appends the provided string to the file synchronously, using the specified encoding (defaults to UTF-8).
Returns void
copy
Copies a file to a given path.
Returns Promise<boolean>
copySync
Copies a file to a given path.
Returns any
read
Reads the binary content of the file asynchronously.
Returns Promise<any>
readSync
Reads the binary content of the file synchronously.
Returns any
readText
Reads the content of the file as a string using the specified encoding (defaults to UTF-8).
Returns Promise<string>
readTextSync
Reads the content of the file as a string synchronously, using the specified encoding (defaults to UTF-8).
Returns string
write
Writes the provided binary content to the file.
Returns Promise<void>
writeSync
Writes the provided binary content to the file synchronously.
Returns void
writeText
Writes the provided string to the file, using the specified encoding (defaults to UTF-8).
Returns Promise<any>
writeTextSync
Writes the provided string to the file synchronously, using the specified encoding (defaults to UTF-8).
Returns void
exists
Static
Checks whether a File with the specified path already exists.
Returns boolean
- Previous
- FadeTransition
- Next
- FileSystemEntity