@caoergou/windows-xp / index / XPFsApi
Interface: XPFsApi
Defined in: src/components/XPBridge.tsx:49
Filesystem actuation from outside the desktop (#115). Paths are absolute.
Properties
createFile
> createFile: (path, node?) => void
Defined in: src/components/XPBridge.tsx:55
Create a file/folder at path. node.type defaults to 'file'.
Parameters
path
string[]
node?
Partial<FileNode>
Returns
void
deleteFile
> deleteFile: (path) => void
Defined in: src/components/XPBridge.tsx:57
Delete the file or folder at path.
Parameters
path
string[]
Returns
void
exists
> exists: (path) => boolean
Defined in: src/components/XPBridge.tsx:61
Whether a node exists at path.
Parameters
path
string[]
Returns
boolean
getNode
> getNode: (path) => FileNode | null
Defined in: src/components/XPBridge.tsx:59
Return the raw node at path, or null.
Parameters
path
string[]
Returns
FileNode | null
readFile
> readFile: (path) => string | null
Defined in: src/components/XPBridge.tsx:51
Read a file node's text content, or null if missing / not a text file.
Parameters
path
string[]
Returns
string | null
unlockNode
> unlockNode: (path) => void
Defined in: src/components/XPBridge.tsx:63
Persistently clear a node's locked flag.
Parameters
path
string[]
Returns
void
writeFile
> writeFile: (path, content) => void
Defined in: src/components/XPBridge.tsx:53
Set a file node's content (persists).
Parameters
path
string[]
content
string
Returns
void