28 const char *
const compName
57 CreateDirectory_cmdHandler(
75 this->emitTelemetry(status);
76 this->sendCommandResponse(opCode, cmdSeq, status);
80 RemoveFile_cmdHandler(
84 const bool ignoreErrors
96 if (ignoreErrors ==
true) {
109 this->emitTelemetry(status);
110 this->sendCommandResponse(opCode, cmdSeq, status);
131 logStringSource, logStringDest, status
136 this->emitTelemetry(status);
137 this->sendCommandResponse(opCode, cmdSeq, status);
141 RemoveDirectory_cmdHandler(
159 this->emitTelemetry(status);
160 this->sendCommandResponse(opCode, cmdSeq, status);
164 ShellCommand_cmdHandler(
176 this->systemCall(command, logFileName);
183 logStringCommand, status
189 this->sendCommandResponse(
197 AppendFile_cmdHandler(
223 this->emitTelemetry(status);
224 this->sendCommandResponse(opCode, cmdSeq, status);
246 U64 size =
static_cast<U64>(size_arg);
249 this->emitTelemetry(status);
250 this->sendCommandResponse(opCode, cmdSeq, status);
272 const char evalStr[] =
"eval '%s' 1>>%s 2>&1\n";
274 char buffer[bufferSize];
277 buffer,
sizeof(buffer), evalStr,
283 const int status = system(buffer);
291 ++this->commandCount;
PlatformIntType NATIVE_INT_TYPE
PlatformUIntType NATIVE_UINT_TYPE
#define FW_CMD_STRING_MAX_SIZE
Max character size of command string arguments.
PlatformSizeType FwSizeType
C++-compatible configuration header for fprime configuration.
@ EXECUTION_ERROR
Command had execution error.
@ OK
Command successfully executed.
const char * toChar() const
void init()
Object initializer.
Auto-generated base for FileManager component.
void pingOut_out(NATIVE_INT_TYPE portNum, U32 key)
Invoke output port pingOut.
void log_ACTIVITY_HI_AppendFileSucceeded(const Fw::LogStringArg &source, const Fw::LogStringArg &target)
void log_WARNING_HI_DirectoryRemoveError(const Fw::LogStringArg &dirName, U32 status)
void log_WARNING_HI_DirectoryCreateError(const Fw::LogStringArg &dirName, U32 status)
void log_ACTIVITY_HI_ShellCommandSucceeded(const Fw::LogStringArg &command)
void log_WARNING_HI_FileSizeError(const Fw::LogStringArg &fileName, U32 status)
void log_ACTIVITY_HI_ShellCommandStarted(const Fw::LogStringArg &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_RemoveFileStarted(const Fw::LogStringArg &fileName)
void log_ACTIVITY_HI_FileSizeSucceeded(const Fw::LogStringArg &fileName, U64 size)
void log_ACTIVITY_HI_FileSizeStarted(const Fw::LogStringArg &fileName)
void log_ACTIVITY_HI_RemoveFileSucceeded(const Fw::LogStringArg &fileName)
void log_ACTIVITY_HI_AppendFileStarted(const Fw::LogStringArg &source, const Fw::LogStringArg &target)
void log_WARNING_HI_FileMoveError(const Fw::LogStringArg &sourceFileName, const Fw::LogStringArg &destFileName, U32 status)
void log_ACTIVITY_HI_RemoveDirectoryStarted(const Fw::LogStringArg &dirName)
void log_WARNING_HI_AppendFileFailed(const Fw::LogStringArg &source, const Fw::LogStringArg &target, U32 status)
void log_ACTIVITY_HI_CreateDirectorySucceeded(const Fw::LogStringArg &dirName)
void log_ACTIVITY_HI_CreateDirectoryStarted(const Fw::LogStringArg &dirName)
void log_ACTIVITY_HI_RemoveDirectorySucceeded(const Fw::LogStringArg &dirName)
void log_ACTIVITY_HI_MoveFileSucceeded(const Fw::LogStringArg &sourceFileName, const Fw::LogStringArg &destFileName)
void log_WARNING_HI_ShellCommandFailed(const Fw::LogStringArg &command, U32 status)
void log_ACTIVITY_HI_MoveFileStarted(const Fw::LogStringArg &sourceFileName, const Fw::LogStringArg &destFileName)
void log_WARNING_HI_FileRemoveError(const Fw::LogStringArg &fileName, U32 status)
FileManager(const char *const compName)
Status createDirectory(const char *path)
create a new directory at location path
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 appendFile(const char *originPath, const char *destPath, bool createMissingDest)
copies a file from origin to destination
@ OP_OK
Operation was successful.
@ OTHER_ERROR
other OS-specific error
Status removeDirectory(const char *path)
remove a directory at location path
Status removeFile(const char *path)
removes a file at location path