Class

FSFile

FSFile()

Contains all methods to work with files.
Constructor

# new FSFile()

View Source fs-file.class.ts, line 11

Classes

FSFile

Members

FSDir

# fsdir

Returns directory wich contains this file

View Source fs-file.class.ts, line 22

FSDir

# fsdir

Returns directory wich contains this file

View Source fs-file.class.ts, line 207

# name

Contains file name.

View Source fs-file.class.ts, line 17

# name

Contains file name.

View Source fs-file.class.ts, line 200

FSFileRead

# read

Contains all methods for file read.

View Source fs-file.class.ts, line 27

FSFileRead

# read

Contains all methods for file read.

View Source fs-file.class.ts, line 214

FSFileWrite

# write

Contains all methods for writing file

View Source fs-file.class.ts, line 32

FSFileWrite

# write

Contains all methods for writing file

View Source fs-file.class.ts, line 221

Methods

# async copyTo(dest, options) → {Promise.<FSFile>}

Copy file. If dest is FSDir, copy file in it with source name.
Parameters:
Name Type Description
dest string | FSDir | FSFile
options copyToOptions is an optional parameter that specifies the behavior of the copy operation. COPYFILE_EXCL: The copy operation will fail if dest already exists. COPYFILE_FICLONE: The copy operation will attempt to create a copy-on-write reflink. If the platform does not support copy-on-write, then a fallback copy mechanism is used. COPYFILE_FICLONE_FORCE: The copy operation will attempt to create a copy-on-write reflink. If the platform does not support copy-on-write, then the operation will fail.

View Source fs-file.class.ts, line 112

return FSFile of destination file
Promise.<FSFile>

# async isExists()

Checks is file exits. If you need write or read file use isWritable or isReadable to check if it possible.

View Source fs-file.class.ts, line 56

# async isReadable()

Checks possibility to read file.

View Source fs-file.class.ts, line 68

# async isWritable()

Checks possibility to write into file.

View Source fs-file.class.ts, line 80

# async moveTo(destDir) → {Promise.<FSFile>}

Moves file to destination directory
Parameters:
Name Type Description
destDir FSDir destination directory

View Source fs-file.class.ts, line 147

- destination file
Promise.<FSFile>

# async rename(targetName) → {Promise.<FSFile>}

Rename file to target
Parameters:
Name Type Description
targetName string name of target file

View Source fs-file.class.ts, line 162

- renamed file
Promise.<FSFile>

# async stat() → {Promise.<Stats>}

Returns file Stats object @

View Source fs-file.class.ts, line 43

Promise.<Stats>
Asynchronously removes a file.

View Source fs-file.class.ts, line 92