Expand description
Safe, idiomatic wrappers for CFE File Services (CFE_FS) and OSAL file APIs.
This module provides a File struct that acts as a safe handle for
file operations, ensuring that files are closed when they go out of scope.
It also provides wrappers for standalone filesystem operations like mkdir and remove.
Structs§
- Directory
- A handle to an open directory.
- File
- A handle to an open file.
- File
Mode - File permission modes for
fs::chmod. - File
Prop - Properties of an open file, returned by
File::info. - File
Stat - A structure containing metadata about a file.
- File
Write Meta Data - Metadata and state for a background file write operation.
- FsHeader
- A safe, idiomatic wrapper for a cFE file header.
- FsInfo
- Statistics about the overall file system.
- StatVfs
- A structure containing statistics about a filesystem volume.
Enums§
- Access
Mode - File access modes for opening or creating a file.
- File
Category - Generalized file types/categories known to FS.
- Seek
From - Defines the origin for a seek operation, used by
File::seek.
Functions§
- add_
fixed_ map - Creates a fixed mapping between a physical host path and a virtual OSAL mount point.
- background_
file_ dump_ request - Registers a background file dump request with Executive Services.
- check_
fs - Checks the health of a file system and optionally repairs it.
- chmod
- Changes the permission mode of a file.
- close_
all_ files - Closes all files that were opened through OSAL.
- close_
file_ by_ name - Closes a file by its filename.
- cp
- Copies a single file from
srctodest. - extract_
filename_ from_ path - Extracts the filename from a unix style path and filename string.
- get_
default_ extension - Gets the default filename extension for a file category (e.g., “.so” or “.log”).
- get_
default_ mount_ point - Gets the default virtual mount point for a file category (e.g., “/ram” or “/cf”).
- get_
fs_ info - Retrieves information about the overall file system.
- get_
phys_ drive_ name - Gets the physical drive name associated with a virtual mount point.
- init_fs
- Initializes an existing file system on the target.
- is_
background_ file_ dump_ pending - Checks if a background file dump request is currently pending.
- is_
file_ open - Checks if a file with the given name is currently open.
- make_fs
- Creates a new file system on a block device or in memory.
- mkdir
- Creates a new directory.
- mount
- Mounts a file system to a virtual mount point.
- mv
- Moves a single file from
srctodest. - parse_
input_ filename - Parses a filename from an input string, applying default path and extension.
- remove
- Removes a file from the file system.
- remove_
fs - Removes a file system mapping from OSAL.
- rename
- Renames a file.
- rmdir
- Removes an empty directory.
- stat
- Retrieves metadata for a file or directory at a given path.
- statvfs
- Retrieves statistics about a filesystem volume.
- translate_
path - Translates an OSAL virtual path to a host-specific local path.
- unmount
- Unmounts a file system.