- Preparing search index...
- The search index is not available
Dappetizer
Methods
existsAsFile
- existsAsFile(filePath: string): Promise<boolean>
-
Returns Promise<boolean>
readFileTextIfExists
- readFileTextIfExists(filePath: string): Promise<null | string>
-
Returns Promise<null | string>
writeFileText
- writeFileText(filePath: string, contents: string): Promise<void>
-
Parameters
-
filePath: string
-
contents: string
Returns Promise<void>
Determines if the file exists.
Returns
true
if the file system item at the path exists and it is a file.false
if there is no the file system item at the path.Throws
Error
if the file system item at the path exists but is is of different type e.g. a directory.Error
including the path and the method name if some other file system error happended.