F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
FileSystemUserInterface.hpp
Go to the documentation of this file.
1
// ======================================================================
2
// \title Os/Interfaces/FileSystemUserInterface.hpp
3
// \brief types shared by Os::FileSystem users and implementations
4
//
5
// Includes no other Os service header, so both Os/FileSystem.hpp and the Os::FileSystem implementations may include it.
6
// ======================================================================
7
#ifndef OS_INTERFACES_FILESYSTEMUSERINTERFACE_HPP_
8
#define OS_INTERFACES_FILESYSTEMUSERINTERFACE_HPP_
9
10
#include <
Fw/FPrimeBasicTypes.hpp
>
11
#include <
Fw/Types/Assert.hpp
>
12
#include <
Os/Os.hpp
>
13
#include <algorithm>
14
15
namespace
Os
{
16
17
struct
FileSystemHandle
{};
18
20
struct
FileSystemUserInterface
{
21
// Size of file chunks to use for file system operations (e.g. copyFile)
22
static
constexpr
FwSizeType
FILE_SYSTEM_FILE_CHUNK_SIZE
=
FW_FILE_CHUNK_SIZE
;
23
24
enum
Status
{
25
OP_OK
,
26
ALREADY_EXISTS
,
27
NO_SPACE
,
28
NO_PERMISSION
,
29
NOT_DIR
,
30
IS_DIR
,
31
NOT_EMPTY
,
32
INVALID_PATH
,
33
DOESNT_EXIST
,
34
FILE_LIMIT
,
35
BUSY
,
36
NO_MORE_FILES
,
37
BUFFER_TOO_SMALL
,
38
EXDEV_ERROR
,
// Operation not supported across devices (e.g. rename)
39
OVERFLOW_ERROR
,
// Operation failed due to overflow in calculation of the result
40
NOT_SUPPORTED
,
41
OTHER_ERROR
,
42
};
43
44
enum
PathType
{
45
FILE
,
46
DIRECTORY
,
47
OTHER
,
48
NOT_EXIST
,
49
};
50
};
51
52
}
// namespace Os
53
54
#endif // OS_INTERFACES_FILESYSTEMUSERINTERFACE_HPP_
Os::FileSystemUserInterface::BUFFER_TOO_SMALL
Buffer size is too small to hold full path (for getWorkingDirectory)
Definition:
FileSystemUserInterface.hpp:37
Os::FileSystemUserInterface::FILE
Path is a file.
Definition:
FileSystemUserInterface.hpp:45
FwSizeType
PlatformSizeType FwSizeType
Definition:
FwSizeTypeAliasAc.h:15
Os::FileSystemHandle
Definition:
FileSystemUserInterface.hpp:17
Os::FileSystemUserInterface::EXDEV_ERROR
Definition:
FileSystemUserInterface.hpp:38
Os::FileSystemUserInterface::FILE_SYSTEM_FILE_CHUNK_SIZE
static constexpr FwSizeType FILE_SYSTEM_FILE_CHUNK_SIZE
Size of file system chunk.
Definition:
FileSystemUserInterface.hpp:22
FPrimeBasicTypes.hpp
Os::FileSystemUserInterface::OP_OK
Operation was successful.
Definition:
FileSystemUserInterface.hpp:25
Os::FileSystemUserInterface::PathType
PathType
Definition:
FileSystemUserInterface.hpp:44
Os::FileSystemUserInterface::INVALID_PATH
Path is too long, too many sym links, etc.
Definition:
FileSystemUserInterface.hpp:32
Os::FileSystemUserInterface::NOT_EXIST
Path does not exist.
Definition:
FileSystemUserInterface.hpp:48
Os::FileSystemUserInterface
types and constants shared by users of Os::FileSystem and by its implementations
Definition:
FileSystemUserInterface.hpp:20
Os::FileSystemUserInterface::NOT_SUPPORTED
Operation is not supported by the current implementation.
Definition:
FileSystemUserInterface.hpp:40
Os::FileSystemUserInterface::IS_DIR
Path is a directory.
Definition:
FileSystemUserInterface.hpp:30
Os::FileSystemUserInterface::BUSY
Operand is in use by the system or by a process.
Definition:
FileSystemUserInterface.hpp:35
Os::FileSystemUserInterface::OTHER
Path is not a file or directory, e.g. a socket.
Definition:
FileSystemUserInterface.hpp:47
Os::FileSystemUserInterface::Status
Status
Definition:
FileSystemUserInterface.hpp:24
Os
Definition:
LocklessQueueCfg.hpp:16
Assert.hpp
Os::FileSystemUserInterface::NOT_EMPTY
directory is not empty
Definition:
FileSystemUserInterface.hpp:31
Os::FileSystemUserInterface::FILE_LIMIT
Too many files or links.
Definition:
FileSystemUserInterface.hpp:34
Os::FileSystemUserInterface::ALREADY_EXISTS
File already exists.
Definition:
FileSystemUserInterface.hpp:26
Os::FileSystemUserInterface::NOT_DIR
Path is not a directory.
Definition:
FileSystemUserInterface.hpp:29
Os::FileSystemUserInterface::NO_SPACE
No space left.
Definition:
FileSystemUserInterface.hpp:27
Os::FileSystemUserInterface::OVERFLOW_ERROR
Definition:
FileSystemUserInterface.hpp:39
FW_FILE_CHUNK_SIZE
Definition:
FppConstantsAc.hpp:730
Os.hpp
Os::FileSystemUserInterface::DIRECTORY
Path is a directory.
Definition:
FileSystemUserInterface.hpp:46
Os::FileSystemUserInterface::NO_PERMISSION
No permission to write.
Definition:
FileSystemUserInterface.hpp:28
Os::FileSystemUserInterface::NO_MORE_FILES
Directory stream has no more files.
Definition:
FileSystemUserInterface.hpp:36
Os::FileSystemUserInterface::OTHER_ERROR
other OS-specific error
Definition:
FileSystemUserInterface.hpp:41
Os::FileSystemUserInterface::DOESNT_EXIST
Path doesn't exist.
Definition:
FileSystemUserInterface.hpp:33
Os
Interfaces
FileSystemUserInterface.hpp
Generated by
1.8.14