WasiFileSystem

Functions

Link copied to clipboard
abstract fun createDirectoryAt(path: String, descriptor: Descriptor = StandardDescriptor.FIRST_PREOPEN)

Create a directory.

Link copied to clipboard
abstract fun openAt(path: String, openFlags: OpenFlags = OpenFlags(), flags: DescriptorFlags = DescriptorFlags(read = true), pathFlags: PathFlags = PathFlags(true), descriptor: Descriptor = StandardDescriptor.FIRST_PREOPEN): Descriptor

Open a file or directory.

Link copied to clipboard
abstract fun read(descriptor: Descriptor, length: Filesize, offset: Filesize): ReadResult

Read from a descriptor, without using and updating the descriptor's offset.

Link copied to clipboard
abstract fun readDirectory(path: String = "", descriptor: Descriptor = StandardDescriptor.FIRST_PREOPEN): List<DirectoryEntry>

Read directory entries from a directory

Link copied to clipboard
abstract fun write(descriptor: Descriptor, buffer: ByteArray, offset: Filesize): Filesize

Write to a descriptor, without using and updating the descriptor's offset.