FsVolume class.
More...
#include <FsVolume.h>
◆ begin()
Initialize an FatVolume object.
- Parameters
-
[in] | blockDev | Device block driver. |
- Returns
- true for success or false for failure.
◆ bytesPerCluster()
uint32_t FsVolume::bytesPerCluster |
( |
| ) |
|
|
inline |
- Returns
- the number of bytes in a cluster.
◆ chdir() [1/2]
Set volume working directory to root.
- Returns
- true for success or false for failure.
◆ chdir() [2/2]
bool FsVolume::chdir |
( |
const char * |
path | ) |
|
|
inline |
Set volume working directory.
- Parameters
-
[in] | path | Path for volume working directory. |
- Returns
- true for success or false for failure.
◆ chvol()
Change global working volume to this volume.
◆ clusterCount()
uint32_t FsVolume::clusterCount |
( |
| ) |
|
|
inline |
- Returns
- The total number of clusters in the volume.
◆ cwv()
- Returns
- current working volume.
◆ dataStartSector()
uint32_t FsVolume::dataStartSector |
( |
| ) |
const |
|
inline |
- Returns
- The logical sector number for the start of file data.
◆ end()
free dynamic memory and end access to volume
◆ exists()
bool FsVolume::exists |
( |
const char * |
path | ) |
|
|
inline |
Test for the existence of a file in a directory
- Parameters
-
[in] | path | Path of the file to be tested for. |
- Returns
- true if the file exists else false.
◆ fatStartSector()
uint32_t FsVolume::fatStartSector |
( |
| ) |
const |
|
inline |
- Returns
- The logical sector number for the start of the first FAT.
◆ fatType()
uint8_t FsVolume::fatType |
( |
| ) |
const |
|
inline |
- Returns
- Partition type, FAT_TYPE_EXFAT, FAT_TYPE_FAT32, FAT_TYPE_FAT16, or zero for error.
◆ freeClusterCount()
uint32_t FsVolume::freeClusterCount |
( |
| ) |
|
|
inline |
- Returns
- the free cluster count.
◆ ls() [1/3]
List directory contents.
- Parameters
-
- Returns
- true for success or false for failure.
◆ ls() [2/3]
bool FsVolume::ls |
( |
print_t * |
pr, |
|
|
uint8_t |
flags |
|
) |
| |
|
inline |
List directory contents.
- Parameters
-
[in] | pr | Print object. |
[in] | flags | The inclusive OR of |
LS_DATE - Print file modification date
LS_SIZE - Print file size.
LS_R - Recursive list of subdirectories.
- Returns
- true for success or false for failure.
◆ ls() [3/3]
bool FsVolume::ls |
( |
print_t * |
pr, |
|
|
const char * |
path, |
|
|
uint8_t |
flags |
|
) |
| |
List the directory contents of a directory.
- Parameters
-
[in] | pr | Print stream for list. |
[in] | path | directory to list. |
[in] | flags | The inclusive OR of |
LS_DATE - Print file modification date
LS_SIZE - Print file size.
LS_R - Recursive list of subdirectories.
- Returns
- true for success or false for failure.
◆ mkdir()
bool FsVolume::mkdir |
( |
const char * |
path, |
|
|
bool |
pFlag = true |
|
) |
| |
|
inline |
Make a subdirectory in the volume root directory.
- Parameters
-
[in] | path | A path with a valid 8.3 DOS name for the subdirectory. |
[in] | pFlag | Create missing parent directories if true. |
- Returns
- true for success or false for failure.
◆ open()
FsFile FsVolume::open |
( |
const char * |
path, |
|
|
oflag_t |
oflag = 0X00 |
|
) |
| |
open a file
- Parameters
-
[in] | path | location of file to be opened. |
[in] | oflag | open flags. |
- Returns
- a FsBaseFile object.
◆ remove()
bool FsVolume::remove |
( |
const char * |
path | ) |
|
|
inline |
Remove a file from the volume root directory.
- Parameters
-
[in] | path | A path with a valid 8.3 DOS name for the file. |
- Returns
- true for success or false for failure.
◆ rename()
bool FsVolume::rename |
( |
const char * |
oldPath, |
|
|
const char * |
newPath |
|
) |
| |
|
inline |
Rename a file or subdirectory.
- Parameters
-
[in] | oldPath | Path name to the file or subdirectory to be renamed. |
[in] | newPath | New path name of the file or subdirectory. |
The newPath object must not exist before the rename call.
The file to be renamed must not be open. The directory entry may be moved and file system corruption could occur if the file is accessed by a file object that was opened before the rename() call.
- Returns
- true for success or false for failure.
◆ rmdir()
bool FsVolume::rmdir |
( |
const char * |
path | ) |
|
|
inline |
Remove a subdirectory from the volume's root directory.
- Parameters
-
[in] | path | A path with a valid 8.3 DOS name for the subdirectory. |
The subdirectory file will be removed only if it is empty.
- Returns
- true for success or false for failure.
◆ sectorsPerCluster()
uint32_t FsVolume::sectorsPerCluster |
( |
| ) |
const |
|
inline |
- Returns
- The volume's cluster size in sectors.
◆ FsBaseFile
The documentation for this class was generated from the following files:
- ArduinoSdFat/libraries/SdFat/src/FsLib/FsVolume.h
- ArduinoSdFat/libraries/SdFat/src/FsLib/FsVolume.cpp