![]() |
Soldered SD Card Arduino Library 1.0.0
Easily read and write files to and form the SD card breakout! A fork of the original SDFat library by Bill Greiman.
|
#include <FsVolume.h>
Inherited by SdBase< FsVolume >.
Public Member Functions | |
| FsVolume () | |
| ~FsVolume () | |
| bool | begin (BlockDevice *blockDev) |
| uint32_t | blocksPerCluster () __attribute__((deprecated)) |
| uint32_t | bytesPerCluster () const |
| bool | chdir () |
| bool | chdir (const char *path) |
| void | chvol () |
| uint32_t | clusterCount () const |
| uint32_t | dataStartSector () const |
| void | end () |
| bool | exists (const char *path) |
| uint32_t | fatStartSector () const |
| uint8_t | fatType () const |
| uint32_t | freeClusterCount () const |
| bool | isBusy () |
| bool | ls (print_t *pr) |
| bool | ls (print_t *pr, uint8_t flags) |
| bool | ls (print_t *pr, const char *path, uint8_t flags) |
| bool | mkdir (const char *path, bool pFlag=true) |
| FsFile | open (const char *path, oflag_t oflag=O_RDONLY) |
| bool | remove (const char *path) |
| bool | rename (const char *oldPath, const char *newPath) |
| bool | rmdir (const char *path) |
| uint32_t | sectorsPerCluster () const |
| bool | ls () |
| bool | ls (uint8_t flags) |
| bool | ls (const char *path, uint8_t flags=0) |
| bool | chdir (const String &path) |
| bool | exists (const String &path) |
| bool | mkdir (const String &path, bool pFlag=true) |
| FsFile | open (const String &path, oflag_t oflag=O_RDONLY) |
| bool | remove (const String &path) |
| bool | rename (const String &oldPath, const String &newPath) |
| bool | rmdir (const String &path) |
Protected Attributes | |
| newalign_t | m_volMem [FS_ALIGN_DIM(ExFatVolume, FatVolume)] |
Private Member Functions | |
| FsVolume (const FsVolume &from) | |
| FsVolume & | operator= (const FsVolume &from) |
Static Private Member Functions | |
| static FsVolume * | cwv () |
Private Attributes | |
| FatVolume * | m_fVol = nullptr |
| ExFatVolume * | m_xVol = nullptr |
| BlockDevice * | m_blockDev |
Static Private Attributes | |
| static FsVolume * | m_cwv = nullptr |
Friends | |
| class | FsBaseFile |
FsVolume class.
|
inline |
|
inline |
|
private |
| bool FsVolume::begin | ( | BlockDevice * | blockDev | ) |
Initialize an FatVolume object.
| [in] | blockDev | Device block driver. |
|
inline |
|
inline |
|
inline |
Set volume working directory to root.
|
inline |
Set volume working directory.
| [in] | path | Path for volume working directory. |
|
inline |
Set volume working directory.
| [in] | path | Path for volume working directory. |
|
inline |
Change global working volume to this volume.
|
inline |
|
inlinestaticprivate |
|
inline |
|
inline |
free dynamic memory and end access to volume
|
inline |
Test for the existence of a file in a directory
| [in] | path | Path of the file to be tested for. |
|
inline |
Test for the existence of a file in a directory
| [in] | path | Path of the file to be tested for. |
|
inline |
|
inline |
|
inline |
|
inline |
Check for BlockDevice busy.
|
inline |
List directory contents.
|
inline |
List the directory contents of a directory to Serial.
| [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.
|
inline |
List directory contents.
| [in] | pr | Print object. |
| bool FsVolume::ls | ( | print_t * | pr, |
| const char * | path, | ||
| uint8_t | flags | ||
| ) |
List the directory contents of a directory.
| [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.
|
inline |
List directory contents.
| [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.
|
inline |
List directory contents.
| [in] | flags | The inclusive OR of |
LS_DATE - Print file modification date
LS_SIZE - Print file size.
LS_R - Recursive list of subdirectories.
|
inline |
Make a subdirectory in the volume root directory.
| [in] | path | A path with a valid 8.3 DOS name for the subdirectory. |
| [in] | pFlag | Create missing parent directories if true. |
|
inline |
Make a subdirectory in the volume root directory.
| [in] | path | A path with a valid 8.3 DOS name for the subdirectory. |
| [in] | pFlag | Create missing parent directories if true. |
open a file
| [in] | path | location of file to be opened. |
| [in] | oflag | open flags. |
open a file
| [in] | path | location of file to be opened. |
| [in] | oflag | open flags. |
|
inline |
Remove a file from the volume root directory.
| [in] | path | A path with a valid 8.3 DOS name for the file. |
|
inline |
Remove a file from the volume root directory.
| [in] | path | A path with a valid 8.3 DOS name for the file. |
|
inline |
Rename a file or subdirectory.
| [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.
|
inline |
Rename a file or subdirectory.
| [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.
|
inline |
Remove a subdirectory from the volume's root directory.
| [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.
|
inline |
Remove a subdirectory from the volume's root directory.
| [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.
|
inline |
|
friend |
FsBaseFile allowed access to private members.
|
private |
|
staticprivate |
Copyright (c) 2011-2020 Bill Greiman This file is part of the SdFat library for SD memory cards.
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
private |
|
protected |
Rename a file or subdirectory.
| [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.
|
private |