Five general operations can be performed on a volume:
- A volume can be opened (mounted). During the opening of a volume, file system control structures are read from the underlying device, parsed and verified.
- Files can be accessed on a volume. A file is a linear data sequence (‘file contents’) associated with some logical, typically human-readable identifier (‘file name’). Additional properties, such as size, update date/time and access mode (e.g., read-only, write-only, read-write) may be associated with a file. File accesses constitute reading data from files, writing data to files, creating new files, renaming files, copying files, etc. File access is accomplished via file module-level functions, which are covered in Files.
- Directories can be accessed on a volume. A directory is a container for files and other directories. Operations include iterating through the contents of the directory, creating new directories, renaming directories, etc. Directory access is accomplished via directory module-level functions, which are covered in Directories.
- A volume can be formatted. (More specifically, high-level formatted.) Formatting writes the control information for a file system to the partition on which a volume is located.
- A volume can be closed (unmounted). During the closing of a volume, any cached data is written to the underlying device and associated structures are freed.
For information about using volume names, see µC/FS Device and Volume Names. For FAT-specific volume functions, see FAT File System.
Function | Description | Valid for Unmounted Volume? |
---|---|---|
FSVol_CacheAssign() | Assign cache to volume. | Yes |
FSVol_CacheInvalidate() | Invalidate cache for volume. | No |
FSVol_CacheFlush() | Flush cache for volume. | No |
FSVol_Close() | Close (unmount) volume. | Yes |
FSVol_Fmt() | Format volume. | Yes |
FSVol_IsMounted() | Determine whether volume is mounted. | Yes |
FSVol_LabelGet() | Get volume label. | No |
FSVol_LabelSet() | Set volume label. | No |
FSVol_Open() | Open (mount) volume. | ----- |
FSVol_Query() | Get volume information. | Yes |
FSVol_Rd() | Read sector on volume. | No |
FSVol_Refresh() | Refresh a volume. | No |
FSVol_Wr() | Write sector on volume. | No |