F´ Flight Software - C/C++ Documentation NASA-v1.6.0
A framework for building embedded system applications to NASA flight quality standards.
|
#include <FpConfig.hpp>
#include <Fw/Types/Assert.hpp>
#include <Os/File.hpp>
#include <Os/FileSystem.hpp>
#include <dirent.h>
#include <sys/stat.h>
#include <sys/statvfs.h>
#include <unistd.h>
#include <cerrno>
#include <cstdio>
#include <cstring>
#include <limits>
Go to the source code of this file.
Namespaces | |
namespace | Os |
namespace | Os::FileSystem |
Functions | |
Status | Os::FileSystem::createDirectory (const char *path) |
create a new directory at location path | |
Status | Os::FileSystem::removeDirectory (const char *path) |
remove a directory at location path | |
Status | Os::FileSystem::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 Directory.hpp | |
Status | Os::FileSystem::removeFile (const char *path) |
removes a file at location path | |
Status | Os::FileSystem::moveFile (const char *originPath, const char *destPath) |
Status | Os::FileSystem::handleFileError (File::Status fileStatus) |
Status | Os::FileSystem::initAndCheckFileStats (const char *filePath, struct stat *fileInfo=nullptr) |
Status | Os::FileSystem::copyFileData (File source, File destination, FwSizeType size) |
Status | Os::FileSystem::copyFile (const char *originPath, const char *destPath) |
moves a file from origin to destination | |
Status | Os::FileSystem::appendFile (const char *originPath, const char *destPath, bool createMissingDest=false) |
copies a file from origin to destination | |
Status | Os::FileSystem::getFileSize (const char *path, FwSizeType &size) |
append file origin to destination file. If boolean true, creates a brand new file if the destination doesn't exist. | |
Status | Os::FileSystem::changeWorkingDirectory (const char *path) |
move current directory to path | |
Status | Os::FileSystem::getFreeSpace (const char *path, FwSizeType &totalBytes, FwSizeType &freeBytes) |
get FS free and total space in bytes on filesystem containing path | |
Status | Os::FileSystem::getFileCount (const char *directory, U32 &fileCount) |
counts the number of files in the given directory | |