Mistake on this page? Email us
pal_plat_fileSystem.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright 2016, 2017 ARM Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *******************************************************************************/
16 #ifndef PAL_PALT_FILE_SYSTEM_H
17 #define PAL_PALT_FILE_SYSTEM_H
18 
19 #include "pal_fileSystem.h"
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
53 palStatus_t pal_plat_fsMkdir(const char *pathName);
54 
55 
56 
68 palStatus_t pal_plat_fsRmdir(const char *pathName);
69 
70 
71 
89 palStatus_t pal_plat_fsFopen(const char *pathName, pal_fsFileMode_t mode, palFileDescriptor_t *fd);
90 
91 
92 
104 
105 
106 
126 palStatus_t pal_plat_fsFread(palFileDescriptor_t *fd, void * buffer, size_t numOfBytes, size_t *numberOfBytesRead);
127 
128 
129 
145 palStatus_t pal_plat_fsFwrite(palFileDescriptor_t *fd, const void *buffer, size_t numOfBytes, size_t *numberOfBytesWritten);
146 
147 
171 
172 
173 
184 
185 
186 
197 palStatus_t pal_plat_fsUnlink(const char *pathName);
198 
199 
200 
212 palStatus_t pal_plat_fsRmFiles(const char *pathName);
213 
214 
215 
228 palStatus_t pal_plat_fsCpFolder(const char *pathNameSrc, char *pathNameDest);
229 
230 
239 
240 
241 
250 size_t pal_plat_fsSizeCheck(const char *stringToChk);
251 
252 
253 
266 
267 
268 #ifdef __cplusplus
269 }
270 #endif
271 #endif
palStatus_t pal_plat_fsMkdir(const char *pathName)
This function attempts to create a directory named pathName.
palStatus_t pal_plat_fsCpFolder(const char *pathNameSrc, char *pathNameDest)
This function copies all files from a source folder to a destination folder (FLAT copy only)...
size_t pal_plat_fsSizeCheck(const char *stringToChk)
This function finds the length of the string received.
palStatus_t pal_plat_fsRmdir(const char *pathName)
This function deletes a directory.
palStatus_t pal_plat_fsRmFiles(const char *pathName)
This function deletes all files in a folder from the file system (FLAT remove only).
uintptr_t palFileDescriptor_t
Pointer to a generic File Descriptor object.
Definition: pal_fileSystem.h:123
const char * pal_plat_fsGetDefaultRootFolder(pal_fsStorageID_t dataID)
This function gets the default value for the root directory.
pal_fsOffset_t
Enum for fseek() relative options.
Definition: pal_fileSystem.h:132
palStatus_t pal_plat_fsFclose(palFileDescriptor_t *fd)
This function closes an open file object.
palStatus_t pal_plat_fsFwrite(palFileDescriptor_t *fd, const void *buffer, size_t numOfBytes, size_t *numberOfBytesWritten)
This function starts to write data from the buffer to the file at the position pointed by the read/wr...
palStatus_t pal_plat_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...
palStatus_t pal_plat_fsFtell(palFileDescriptor_t *fd, int32_t *pos)
This function gets the current read/write pointer of a file.
palStatus_t pal_plat_fsFread(palFileDescriptor_t *fd, void *buffer, size_t numOfBytes, size_t *numberOfBytesRead)
This function reads an array of bytes from the stream and stores them in the block of memory specifie...
PAL file system. This file contains the file system APIs and is part of the PAL service API...
palStatus_t pal_plat_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...
pal_fsStorageID_t
Enum for partition access.
Definition: pal_fileSystem.h:155
pal_fsFileMode_t
Enum for fopen() permission options.
Definition: pal_fileSystem.h:142
int32_t palStatus_t
Definition: pal_types.h:49
palStatus_t pal_plat_fsUnlink(const char *pathName)
This function deletes a single file from the file system.
palStatus_t pal_plat_fsFormat(pal_fsStorageID_t dataID)
This function formats the chosen SD partition.