silk.system.filesystem_machine.
A filesystem provider for absolute paths in the host machine namespace.
When to use#
Use MachineFileSystem in host tools that must access more than one directory.
Unix paths use /...; Windows paths use /C:/... or /UNC/server/share/.... This provider is not confined
to an application directory. Use OsFileSystem for a confined root instead.
Import as MachineFileSystem with import silk.system.filesystem_machine { MachineFileSystem }.
Public declarations: 1.
MachineFileSystem#
pub struct MachineFileSystemThe native filesystem in the absolute machine namespace.
Details#
Unix paths retain their absolute spelling. Windows paths select a drive or UNC share,
such as /C:/work/main.silk or /UNC/server/share/main.silk; drive letters are case insensitive
and other bytes retain their case and canonical WTF-8 spelling. Windows requires NTFS.
Relative symbolic links resolve inside their drive or share; absolute links must name that root
with matching spelling except drive-letter case. Unknown reparse tags and other-root targets
are unsupported. Resolution stops after 40 links with InvalidPath. Remote atomic publication,
directory synchronization, and synchronized publication are unsupported; deletion requires
the server's POSIX disposition support. Ordinary UNC reads, writes, creation, and listing are supported.
The path / has no Windows volume and fails with InvalidPath.
Each drive or share retains its own temporary-name counter for the provider's lifetime.
Implementation MachineFileSystem#
impl MachineFileSystemAssociated function make#
pub effect fn make() -> MachineFileSystem ! OutOfMemoryError ? &mut AllocatorCreates a provider for the machine's absolute paths without opening any directories.
Errors#
OutOfMemoryErrorif the provider's roots cannot be allocated.
Implementation FileSystem for MachineFileSystem#
impl FileSystem for MachineFileSystemOperation readFile#
readFile: MachineFileSystem.readFileOperation writeFile#
writeFile: MachineFileSystem.writeFileOperation createFile#
createFile: MachineFileSystem.createFileOperation writeFileAtomic#
writeFileAtomic: MachineFileSystem.writeFileAtomicOperation syncDirectory#
syncDirectory: MachineFileSystem.syncDirectoryOperation stat#
stat: MachineFileSystem.statOperation listDirectory#
listDirectory: MachineFileSystem.listDirectoryOperation createDirectory#
createDirectory: MachineFileSystem.createDirectoryOperation removeFile#
removeFile: MachineFileSystem.removeFileOperation removeDirectory#
removeDirectory: MachineFileSystem.removeDirectoryOperation createTemporaryDirectory#
createTemporaryDirectory: MachineFileSystem.createTemporaryDirectoryCategory: System.
Profiles: aarch64-apple-darwin, aarch64-unknown-linux-gnu, x86_64-unknown-linux-gnu, wasm32-wasip1, wasm32-wasip2, x86_64-pc-windows-msvc.