28 const char *
const compName
48 CreateDirectory_cmdHandler(
56 bool errorIfDirExists =
true;
67 this->emitTelemetry(status);
68 this->sendCommandResponse(opCode, cmdSeq, status);
72 RemoveFile_cmdHandler(
76 const bool ignoreErrors
88 if (ignoreErrors ==
true) {
101 this->emitTelemetry(status);
102 this->sendCommandResponse(opCode, cmdSeq, status);
123 logStringSource, logStringDest, status
128 this->emitTelemetry(status);
129 this->sendCommandResponse(opCode, cmdSeq, status);
133 RemoveDirectory_cmdHandler(
151 this->emitTelemetry(status);
152 this->sendCommandResponse(opCode, cmdSeq, status);
156 ShellCommand_cmdHandler(
168 this->systemCall(command, logFileName);
175 logStringCommand,
static_cast<U32
>(status)
181 this->sendCommandResponse(
189 AppendFile_cmdHandler(
215 this->emitTelemetry(status);
216 this->sendCommandResponse(opCode, cmdSeq, status);
238 U64 size =
static_cast<U64>(size_arg);
241 this->emitTelemetry(status);
242 this->sendCommandResponse(opCode, cmdSeq, status);
264 const char evalStr[] =
"eval '%s' 1>>%s 2>&1\n";
266 char buffer[bufferSize];
269 buffer,
sizeof(buffer), evalStr,
275 const int status = system(buffer);
283 ++this->commandCount;
PlatformIntType NATIVE_INT_TYPE
PlatformUIntType NATIVE_UINT_TYPE
PlatformSignedSizeType FwSignedSizeType
#define FW_CMD_STRING_MAX_SIZE
Max character size of command string arguments.
C++-compatible configuration header for fprime configuration.
@ EXECUTION_ERROR
Command had execution error.
@ OK
Command successfully executed.
const char * toChar() const
static Status moveFile(const char *sourcePath, const char *destPath)
Move a file from sourcePath to destPath.
static Status appendFile(const char *sourcePath, const char *destPath, bool createMissingDest=false)
Append the source file to the destination file.
static Status removeFile(const char *path)
Remove a file at the specified path.
static Status removeDirectory(const char *path)
Remove a directory at the specified path.
static Status getFileSize(const char *path, FwSignedSizeType &size)
Get the size of the file (in bytes) at the specified path.
static Status createDirectory(const char *path, bool errorIfAlreadyExists=false)
Create a new directory at the specified path.
@ OP_OK
Operation was successful.
@ OTHER_ERROR
other OS-specific error
Auto-generated base for FileManager component.
void log_ACTIVITY_HI_MoveFileSucceeded(const Fw::StringBase &sourceFileName, const Fw::StringBase &destFileName)
void log_ACTIVITY_HI_RemoveFileStarted(const Fw::StringBase &fileName)
void pingOut_out(FwIndexType portNum, U32 key)
Invoke output port pingOut.
void log_ACTIVITY_HI_RemoveDirectorySucceeded(const Fw::StringBase &dirName)
void log_ACTIVITY_HI_MoveFileStarted(const Fw::StringBase &sourceFileName, const Fw::StringBase &destFileName)
void log_ACTIVITY_HI_RemoveFileSucceeded(const Fw::StringBase &fileName)
void log_WARNING_HI_ShellCommandFailed(const Fw::StringBase &command, U32 status)
void log_ACTIVITY_HI_ShellCommandSucceeded(const Fw::StringBase &command)
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
void tlmWrite_CommandsExecuted(U32 arg, Fw::Time _tlmTime=Fw::Time())
void tlmWrite_Errors(U32 arg, Fw::Time _tlmTime=Fw::Time())
void log_ACTIVITY_HI_AppendFileSucceeded(const Fw::StringBase &source, const Fw::StringBase &target)
void log_WARNING_HI_DirectoryRemoveError(const Fw::StringBase &dirName, U32 status)
void log_ACTIVITY_HI_FileSizeStarted(const Fw::StringBase &fileName)
void log_WARNING_HI_FileMoveError(const Fw::StringBase &sourceFileName, const Fw::StringBase &destFileName, U32 status)
void log_ACTIVITY_HI_RemoveDirectoryStarted(const Fw::StringBase &dirName)
void log_WARNING_HI_FileSizeError(const Fw::StringBase &fileName, U32 status)
void log_WARNING_HI_DirectoryCreateError(const Fw::StringBase &dirName, U32 status)
void log_WARNING_HI_AppendFileFailed(const Fw::StringBase &source, const Fw::StringBase &target, U32 status)
void log_ACTIVITY_HI_CreateDirectorySucceeded(const Fw::StringBase &dirName)
void log_ACTIVITY_HI_ShellCommandStarted(const Fw::StringBase &command)
void log_ACTIVITY_HI_CreateDirectoryStarted(const Fw::StringBase &dirName)
void log_ACTIVITY_HI_AppendFileStarted(const Fw::StringBase &source, const Fw::StringBase &target)
void log_WARNING_HI_FileRemoveError(const Fw::StringBase &fileName, U32 status)
void log_ACTIVITY_HI_FileSizeSucceeded(const Fw::StringBase &fileName, U64 size)
FileManager(const char *const compName)