Files
wehub-resource-sync 2114b14ee0
Sync main into demo / sync (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:35:26 +08:00

794 B

FileSystem Service

The simulator exposes a virtual filesystem rooted at Android-like paths such as:

/sdcard/Documents
/sdcard/Pictures
/sdcard/Download

Apps should use FileSystemService; benchmark/debug code can use __SIM_FS__.

import * as FileSystem from '@/os/FileSystemService';

await FileSystem.writeFile('/sdcard/Documents/report.txt', 'hello', { mimeType: 'text/plain' });
const blob = await FileSystem.readFile('/sdcard/Documents/report.txt');
FileSystem.listDirectory('/sdcard/Documents');
await FileSystem.deleteNode('/sdcard/Documents/report.txt');

The backing store may be persisted or volatile depending on build/test setup. Treat files as simulator state, not browser downloads.

See the service index for broader context: README.md.