29 const char *
const compName
49 CreateDirectory_cmdHandler(
57 bool errorIfDirExists =
true;
68 this->emitTelemetry(status);
69 this->sendCommandResponse(opCode, cmdSeq, status);
73 RemoveFile_cmdHandler(
77 const bool ignoreErrors
89 if (ignoreErrors ==
true) {
102 this->emitTelemetry(status);
103 this->sendCommandResponse(opCode, cmdSeq, status);
124 logStringSource, logStringDest, status
129 this->emitTelemetry(status);
130 this->sendCommandResponse(opCode, cmdSeq, status);
134 RemoveDirectory_cmdHandler(
152 this->emitTelemetry(status);
153 this->sendCommandResponse(opCode, cmdSeq, status);
157 ShellCommand_cmdHandler(
169 this->systemCall(command, logFileName);
176 logStringCommand, static_cast<U32>(status)
182 this->sendCommandResponse(
190 AppendFile_cmdHandler(
216 this->emitTelemetry(status);
217 this->sendCommandResponse(opCode, cmdSeq, status);
239 U64 size =
static_cast<U64>(size_arg);
242 this->emitTelemetry(status);
243 this->sendCommandResponse(opCode, cmdSeq, status);
267 const char evalStr[] =
"eval '%s' 1>>%s 2>&1\n";
269 char buffer[bufferSize];
278 const int status = system(stringBuffer.toChar());
286 ++this->commandCount;
void log_ACTIVITY_HI_FileSizeSucceeded(const Fw::StringBase &fileName, U64 size) const
void log_ACTIVITY_HI_CreateDirectoryStarted(const Fw::StringBase &dirName) const
void log_ACTIVITY_HI_RemoveDirectorySucceeded(const Fw::StringBase &dirName) const
static Status moveFile(const char *sourcePath, const char *destPath)
Move a file from sourcePath to destPath.
void log_WARNING_HI_FileSizeError(const Fw::StringBase &fileName, U32 status) const
FileManager(const char *const compName)
PlatformIntType NATIVE_INT_TYPE
static Status removeDirectory(const char *path)
Remove a directory at the specified path.
static Status appendFile(const char *sourcePath, const char *destPath, bool createMissingDest=false)
Append the source file to the destination file.
Auto-generated base for FileManager component.
void pingOut_out(FwIndexType portNum, U32 key)
Invoke output port pingOut.
void log_ACTIVITY_HI_MoveFileStarted(const Fw::StringBase &sourceFileName, const Fw::StringBase &destFileName) const
PlatformIndexType FwIndexType
void log_ACTIVITY_HI_AppendFileSucceeded(const Fw::StringBase &source, const Fw::StringBase &target) const
void log_ACTIVITY_HI_CreateDirectorySucceeded(const Fw::StringBase &dirName) const
void log_ACTIVITY_HI_RemoveDirectoryStarted(const Fw::StringBase &dirName) const
void log_ACTIVITY_HI_ShellCommandSucceeded(const Fw::StringBase &command) const
A string backed by an external buffer.
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
void log_ACTIVITY_HI_FileSizeStarted(const Fw::StringBase &fileName) const
Command successfully executed.
C++-compatible configuration header for fprime configuration.
void log_ACTIVITY_HI_MoveFileSucceeded(const Fw::StringBase &sourceFileName, const Fw::StringBase &destFileName) const
static Status createDirectory(const char *path, bool errorIfAlreadyExists=false)
Create a new directory at the specified path.
void log_WARNING_HI_DirectoryRemoveError(const Fw::StringBase &dirName, U32 status) const
Command had execution error.
const char * toChar() const
void log_ACTIVITY_HI_AppendFileStarted(const Fw::StringBase &source, const Fw::StringBase &target) const
void tlmWrite_Errors(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
void log_ACTIVITY_HI_RemoveFileStarted(const Fw::StringBase &fileName) const
void log_ACTIVITY_HI_ShellCommandStarted(const Fw::StringBase &command) const
void log_WARNING_HI_AppendFileFailed(const Fw::StringBase &source, const Fw::StringBase &target, U32 status) const
PlatformSignedSizeType FwSignedSizeType
static Status getFileSize(const char *path, FwSignedSizeType &size)
Get the size of the file (in bytes) at the specified path.
Operation was successful.
void log_WARNING_HI_ShellCommandFailed(const Fw::StringBase &command, U32 status) const
void log_WARNING_HI_DirectoryCreateError(const Fw::StringBase &dirName, U32 status) const
void log_ACTIVITY_HI_RemoveFileSucceeded(const Fw::StringBase &fileName) const
void log_WARNING_HI_FileMoveError(const Fw::StringBase &sourceFileName, const Fw::StringBase &destFileName, U32 status) const
void tlmWrite_CommandsExecuted(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
static Status removeFile(const char *path)
Remove a file at the specified path.
void log_WARNING_HI_FileRemoveError(const Fw::StringBase &fileName, U32 status) const
#define FW_CMD_STRING_MAX_SIZE
Max character size of command string arguments.
FormatStatus
status of string format calls