T

NativePlatformFiles

File operations inside the Unbound folder in Discord's documents directory.

type NativePlatformFiles = { … }

Members

read?(path: string): string | undefined

Reads a text file, by path relative to the Unbound folder; undefined when it is missing. Older loaders lack it.

remove(path: string): boolean

Removes a file or folder tree, by path relative to the Unbound folder; returns whether anything was removed.

write?(path: string, text: string): boolean

Replaces a text file atomically, by path relative to the Unbound folder; returns whether it was written. Older loaders lack it.