19 #ifndef PAL_FILE_SYSTEM_H    20 #define PAL_FILE_SYSTEM_H    23     #error "Please do not include this file directly, use pal.h instead"   117 #define PAL_MAX_FILE_NAME_SIZE      8                  118 #define PAL_MAX_FILE_NAME_SUFFIX    3                  119 #define PAL_MAX_FOLDER_DEPTH_CHAR   66                 120 #define PAL_MAX_FILE_AND_FOLDER_LENGTH  (PAL_MAX_FILE_NAME_SIZE + PAL_MAX_FILE_NAME_SUFFIX + PAL_MAX_FOLDER_DEPTH_CHAR + 1)    121 #define PAL_MAX_FULL_FILE_NAME  (PAL_MAX_FILE_NAME_SUFFIX + PAL_MAX_FOLDER_DEPTH_CHAR + 1)    296         size_t numOfBytes, 
size_t *numberOfBytesRead);
   314         size_t numOfBytes, 
size_t *numberOfBytesWritten);
 Open for reading and writing. The stream is positioned at the beginning of the file, same as "r+ ". 
Definition: pal_fileSystem.h:145
 
palStatus_t pal_fsCpFolder(const char *pathNameSrc, char *pathNameDest)
This function copies all files from the source folder to the destination folder. Flat copy only...
 
palStatus_t pal_fsRmFiles(const char *pathName)
This function deletes all files and folders in a specified folder from the file system. Flat remove only. 
 
void pal_fsCleanup(void)
This function will perform clean up on all file system resources. 
 
palStatus_t pal_fsFseek(palFileDescriptor_t *fd, int32_t offset, pal_fsOffset_t whence)
This function moves the file read/write pointer without any read/write operation to the file...
 
palStatus_t pal_fsFormat(pal_fsStorageID_t dataID)
This function formats a given SD partition. 
 
Open file for reading only. The stream is positioned at the beginning of the file, same as "r". 
Definition: pal_fileSystem.h:144
 
Definition: pal_fileSystem.h:148
 
palStatus_t pal_fsMkDir(const char *pathName)
This function attempts to create a directory named pathName. 
 
The current position indicator. 
Definition: pal_fileSystem.h:135
 
Must be last value. . 
Definition: pal_fileSystem.h:158
 
Definition: pal_fileSystem.h:143
 
uintptr_t palFileDescriptor_t
Pointer to a generic File Descriptor object. 
Definition: pal_fileSystem.h:123
 
pal_fsOffset_t
Enum for fseek() relative options. 
Definition: pal_fileSystem.h:132
 
Open for reading and writing exclusively. The stream is positioned at the beginning of the file...
Definition: pal_fileSystem.h:146
 
Primary partition. . 
Definition: pal_fileSystem.h:156
 
palStatus_t pal_fsUnlink(const char *pathName)
This function deletes a single file from the file system. 
 
End of file. 
Definition: pal_fileSystem.h:136
 
palStatus_t pal_fsFopen(const char *pathName, pal_fsFileMode_t mode, palFileDescriptor_t *fd)
This function opens the file whose name is specified in the parameter pathName and associates it with...
 
Open for reading and writing exclusively. The stream is positioned at the beginning of the file...
Definition: pal_fileSystem.h:147
 
Definition: pal_fileSystem.h:133
 
pal_fsStorageID_t
Enum for partition access. 
Definition: pal_fileSystem.h:155
 
palStatus_t pal_fsFread(palFileDescriptor_t *fd, void *buffer, size_t numOfBytes, size_t *numberOfBytesRead)
This function reads an array of bytes from the stream and stores it in the block of memory specified ...
 
pal_fsFileMode_t
Enum for fopen() permission options. 
Definition: pal_fileSystem.h:142
 
palStatus_t pal_fsGetMountPoint(pal_fsStorageID_t dataID, size_t length, char *Path)
This function gets the mount directory for the given storage ID (primary or secondary). 
 
palStatus_t pal_fsSetMountPoint(pal_fsStorageID_t dataID, const char *Path)
This function sets the mount directory for the given storage ID (primary or secondary). 
 
palStatus_t pal_fsRmDir(const char *pathName)
This function deletes a directory. 
 
palStatus_t pal_fsFwrite(palFileDescriptor_t *fd, const void *buffer, size_t numOfBytes, size_t *numberOfBytesWritten)
This function starts to write data from buffer to the file at the position pointed by the read/write ...
 
Relative to the start of the file. 
Definition: pal_fileSystem.h:134
 
Secondary partition. . 
Definition: pal_fileSystem.h:157
 
bool pal_fsIsPrivatePartition(pal_fsStorageID_t dataID)
This function will return whether a given partition is used only by PAL or not. 
 
Definition: pal_fileSystem.h:137
 
int32_t palStatus_t
Definition: pal_types.h:49
 
palStatus_t pal_fsFclose(palFileDescriptor_t *fd)
This function closes an open file object. 
 
palStatus_t pal_fsFtell(palFileDescriptor_t *fd, int32_t *pos)
This function gets the current read/write pointer of a file.