Skip to content

createFile

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

Create a file of empty data. If the same file already exists, it is ignored.

Any parent directory the path needs is created along with the file.

A path that is empty or nothing but whitespace does nothing, so an empty form field does not become a file literally named .

Parameters

NameTypeRequiredDefault
filePathstringStringstr
File or directory path

Returns

Promise<void>

Future<void>

None

Examples

javascript
await createFile('/home/user/test.txt');
dart
await createFile('/home/user/test.txt');
python
createFile('/home/user/test.txt')

Released under the MIT License