Filesystem
Neutralino's Filesystem API: https://neutralino.js.org/docs/api/filesystem
fs.read(file, binary = false)
Arguments:
Name
Description
file: string
Path to the file
binary: boolean = false
If true, then will return ArrayBuffer object. Otherwise - string
Returns Promise<string|ArrayBuffer>
import { fs } from '@empathize/framework';
// print 'my_file.txt' content to the console
fs.read('my_file.txt').then(console.log);fs.write(file, data)
import { fs } from '@empathize/framework';
// Write 'Hello, World!' to 'my_file.txt'
fs.write('my_file.txt', 'Hello, World!');fs.exists(path)
import { fs } from '@empathize/framework';
// Check if 'my_file.txt' exists
fs.exists('my_file.txt').then(console.log);fs.stats(path)
fs.remove(file)
fs.files(path)
fs.mkdir(directory)
fs.copy(from, to)
fs.move(from, to)
Last updated