Expand description
File system operations module for C API
Provides C-compatible wrappers around Rust’s std::fs API. This allows C code to use Rust’s file operations without importing stdio.h.
Structs§
- DirEntry
- A directory entry
- DirEntry
Vec - File
Error - Error when performing file operations
- File
Metadata - Metadata about a file
- File
Path - FFI-safe path type with OOP-style methods
Enums§
- DirEntry
VecDestructor - File
Error Kind - Kind of file error
- File
Type - File type (file, directory, symlink)
- Option
File Path - Result
DirEntry VecFile Error - Result
File Metadata File Error - Result
File Path File Error - Result
String File Error - Result
U8Vec File Error - Result
Void File Error - Resultu64
File Error
Functions§
- dir_
create - Create a directory
- dir_
create_ all - Create a directory and all parent directories
- dir_
delete - Delete an empty directory
- dir_
delete_ all - Delete a directory and all its contents
- dir_
list - List directory contents
- file_
append - Append bytes to a file
- file_
copy - Copy a file
- file_
delete - Delete a file
- file_
metadata - Get file metadata
- file_
read - Read a file to bytes
- file_
read_ string - Read a file to string (UTF-8)
- file_
rename - Rename/move a file
- file_
write - Write bytes to a file (creates or overwrites)
- file_
write_ string - Write string to a file (creates or overwrites)
- path_
canonicalize - Canonicalize a path (resolve symlinks, make absolute)
- path_
exists - Check if a file or directory exists
- path_
extension - Get the file extension from a path
- path_
file_ name - Get the file name from a path
- path_
is_ dir - Check if path is a directory
- path_
is_ file - Check if path is a file
- path_
join - Join two paths
- path_
parent - Get the parent directory of a path
- temp_
dir - Get the system temporary directory
- temp_
file_ create - Create a temporary file and return its path