Module fs/types
fs/types
File system types for open modes, permissions, and seek positions.
Types
OpenMode
enum
OpenMode
Determines how a file is opened.
Variants
| Variant | Fields | Description |
|---|---|---|
Read | Read an existing file (O_RDONLY). | |
Write | Create or overwrite a file (O_WRONLY | O_CREAT | O_TRUNC). | |
Append | Append to a file (O_WRONLY | O_CREAT | O_APPEND). | |
ReadWrite | Read and write an existing file (O_RDWR). | |
CreateNew | Create a new file, fail if it already exists (O_WRONLY | O_CREAT | O_EXCL). |
FilePermission
newtype
FilePermission
POSIX file permission bits.
Fields
| Name | Type | Description |
|---|---|---|
mode | u32 |
impl(FilePermission, ...)
default : (FilePermission) fn() -> FilePermissionReturns: FilePermission
executable : (FilePermission) fn() -> FilePermissionReturns: FilePermission
readonly : (FilePermission) fn() -> FilePermissionReturns: FilePermission
private : (FilePermission) fn() -> FilePermissionReturns: FilePermission
SeekFrom
enum
SeekFrom
Reference point for file seek operations.
Variants
| Variant | Fields | Description |
|---|---|---|
Start | Seek from the beginning of the file. | |
Current | Seek relative to the current position. | |
End | Seek relative to the end of the file. |