Permalink
Browse files

Added mkdir command

  • Loading branch information...
1 parent 2342b00 commit 931ea4f9c31d3fcb9571148e83bbb6fb69d0cf65 @bmcdorman bmcdorman committed Aug 1, 2011
Showing with 4 additions and 0 deletions.
  1. +2 −0 cbcui/src/Serial/SerialServer.cpp
  2. +2 −0 cbcui/src/Serial/SerialServer.h
@@ -146,6 +146,7 @@ void SerialServer::processData(quint16 command, QByteArray& data)
case KISS_GET_STATE_COMMAND: kissGetStateCommand(data); break;
case KISS_GET_STDOUT_COMMAND: kissGetStdoutCommand(data); break;
case KISS_DELETE_FILE_COMMAND: kissDeleteFileCommand(data); break;
+ case KISS_MKDIR_COMMAND: kissMkdirCommand(data); break;
}
}
@@ -316,3 +317,4 @@ void SerialServer::kissGetStateCommand(const QByteArray& data)
void SerialServer::kissGetStdoutCommand(const QByteArray& data) { sendCommand(CBC_STDOUT_RESULT, text.toAscii()); text.clear(); }
void SerialServer::kissDeleteFileCommand(const QByteArray& data) { QFile::remove(QString(data)); }
+void SerialServer::kissMkdirCommand(const QByteArray& data) { QDir().mkpath(QString(data)); }
@@ -70,6 +70,7 @@ typedef struct {
#define KISS_GET_STATE_COMMAND 21
#define KISS_GET_STDOUT_COMMAND 22
#define KISS_DELETE_FILE_COMMAND 23
+#define KISS_MKDIR_COMMAND 24
#define CBC_REQUEST_FILE_RESULT 127
#define CBC_LS_RESULT 128
@@ -136,6 +137,7 @@ private slots:
void kissGetStateCommand(const QByteArray& data);
void kissGetStdoutCommand(const QByteArray& data);
void kissDeleteFileCommand(const QByteArray& data);
+ void kissMkdirCommand(const QByteArray& data);
SharedMem<UIData> m_uiData;
QString text;

0 comments on commit 931ea4f

Please sign in to comment.