F´ Flight Software - C/C++ Documentation devel
A framework for building embedded system applications to NASA flight quality standards.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FileSystem.cpp
Go to the documentation of this file.
1#include <FpConfig.hpp>
2#include <Fw/Types/Assert.hpp>
3#include <Os/File.hpp>
4#include <Os/FileSystem.hpp>
5
6namespace Os {
7namespace FileSystem {
8Status createDirectory(const char* path) {
9 return NO_SPACE;
10} // end createDirectory
11
12Status removeDirectory(const char* path) {
13 return INVALID_PATH;
14} // end removeDirectory
15
16Status readDirectory(const char* path, const U32 maxNum, Fw::String fileArray[], U32& numFiles) {
17 numFiles = 0;
18 return OTHER_ERROR;
19} // end readDirectory
20
21Status removeFile(const char* path) {
22 return OTHER_ERROR;
23} // end removeFile
24
25Status moveFile(const char* originPath, const char* destPath) {
26 return OTHER_ERROR;
27
28} // end moveFile
29
31 return OTHER_ERROR;
32} // end handleFileError
33
34Status copyFile(const char* originPath, const char* destPath) {
35 return OTHER_ERROR;
36} // end copyFile
37
38Status getFileSize(const char* path, FwSizeType& size) {
39 return OTHER_ERROR;
40} // end getFileSize
41
42Status changeWorkingDirectory(const char* path) {
43 return OTHER_ERROR;
44} // end changeWorkingDirectory
45// Public function to get the file count for a given directory.
46Status getFileCount(const char* directory, U32& fileCount) {
47 return OTHER_ERROR;
48} // end getFileCount
49Status appendFile(const char* originPath, const char* destPath, bool createMissingDest) {
50 return OTHER_ERROR;
51}
52Status getFreeSpace(const char* path, FwSizeType& totalBytes, FwSizeType& freeBytes) {
53 return OTHER_ERROR;
54}
55} // namespace FileSystem
56} // namespace Os
PlatformSizeType FwSizeType
Definition FpConfig.h:18
C++-compatible configuration header for fprime configuration.
Status getFileCount(const char *directory, U32 &fileCount)
counts the number of files in the given directory
Status getFreeSpace(const char *path, FwSizeType &totalBytes, FwSizeType &freeBytes)
get FS free and total space in bytes on filesystem containing path
Status handleFileError(File::Status fileStatus)
Status createDirectory(const char *path)
create a new directory at location path
Definition FileSystem.cpp:8
Status moveFile(const char *originPath, const char *destPath)
Status getFileSize(const char *path, FwSizeType &size)
append file origin to destination file. If boolean true, creates a brand new file if the destination ...
Status changeWorkingDirectory(const char *path)
move current directory to path
Status appendFile(const char *originPath, const char *destPath, bool createMissingDest)
copies a file from origin to destination
@ INVALID_PATH
Path is too long, too many sym links, doesn't exist, ect.
@ OTHER_ERROR
other OS-specific error
@ NO_SPACE
No space left.
Status copyFile(const char *originPath, const char *destPath)
moves a file from origin to destination
Status removeDirectory(const char *path)
remove a directory at location path
Status removeFile(const char *path)
removes a file at location path
Status readDirectory(const char *path, const U32 maxNum, Fw::String fileArray[], U32 &numFiles)
read the contents of a directory. Size of fileArray should be maxNum. Cleaner implementation found in...
Definition File.cpp:6