Module virtual_fs::mem_fs::file
source · Expand description
This module contains the FileHandle
and File
implementations. They aren’t exposed to the public API. Only
FileHandle
can be used through the VirtualFile
trait object.
Structs§
- File 🔒The real file! It is simply a buffer of bytes with a cursor that represents a read/write position in the buffer.
- A file handle. The file system doesn’t return the
File
type directly, but rather thisFileHandle
type, which contains the inode, the flags, and (a light copy of) the filesystem. For each operations, it is checked that the permissions allow the operations to be executed, and then it is checked that the file still exists in the file system. After that, the operation is delegated to the file itself. - Read only file that uses copy-on-write