Skip to content

isFileExists

Requires a Node.js runtime ('qsu/node')

If a file or directory exists at the specified path, it returns trueTrue.

Parameters

NameTypeRequiredDefault
filePathstringStringstr

Returns

Promise<boolean>

Future<bool>

bool

Examples

javascript
await isFileExists('text.txt'); // true
await isFileExists('not-exist.txt'); // false
dart
await isFileExists('text.txt'); // true
await isFileExists('not-exist.txt'); // false
python
isFileExists('text.txt') # True
isFileExists('not-exist.txt') # False

Released under the MIT License