본문으로 건너뛰기

isFileExists

Node.js 런타임 필요 ('qsu/node')

지정된 경로에 대한 파일이나 디렉토리가 존재하면 trueTrue를 반환합니다.

Parameters

이름타입필수기본값
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