delete directory: recursive option
This commit is contained in:
parent
323577cdc6
commit
da8a447073
@ -34,8 +34,9 @@ void GenericFileSystemMessage::setReportFileAttributesReply(CommandMessage *mess
|
||||
}
|
||||
|
||||
void GenericFileSystemMessage::setDeleteDirectoryCommand(CommandMessage* message,
|
||||
store_address_t storeId) {
|
||||
store_address_t storeId, bool deleteRecursively) {
|
||||
message->setCommand(CMD_DELETE_DIRECTORY);
|
||||
message->setParameter(deleteRecursively);
|
||||
message->setParameter2(storeId.raw);
|
||||
}
|
||||
|
||||
@ -133,6 +134,12 @@ bool GenericFileSystemMessage::getReadReply(const CommandMessage *message,
|
||||
return message->getParameter();
|
||||
}
|
||||
|
||||
store_address_t GenericFileSystemMessage::getDeleteDirectoryCommand(const CommandMessage *message,
|
||||
bool &deleteRecursively) {
|
||||
deleteRecursively = message->getParameter();
|
||||
return getStoreId(message);
|
||||
}
|
||||
|
||||
ReturnValue_t GenericFileSystemMessage::clear(CommandMessage* message) {
|
||||
switch(message->getCommand()) {
|
||||
case(CMD_CREATE_FILE):
|
||||
|
@ -79,7 +79,9 @@ public:
|
||||
static void setCreateDirectoryCommand(CommandMessage* message,
|
||||
store_address_t storeId);
|
||||
static void setDeleteDirectoryCommand(CommandMessage* message,
|
||||
store_address_t storeId);
|
||||
store_address_t storeId, bool deleteRecursively);
|
||||
static store_address_t getDeleteDirectoryCommand(const CommandMessage* message,
|
||||
bool& deleteRecursively);
|
||||
|
||||
static void setSuccessReply(CommandMessage* message);
|
||||
static void setFailureReply(CommandMessage* message,
|
||||
|
@ -97,7 +97,8 @@ public:
|
||||
* @param repositoryPath
|
||||
* @param args Any other arguments which an implementation might require
|
||||
*/
|
||||
virtual ReturnValue_t removeDirectory(const char* repositoryPath, void* args = nullptr) = 0;
|
||||
virtual ReturnValue_t removeDirectory(const char* repositoryPath,
|
||||
bool deleteRecurively = false, void* args = nullptr) = 0;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user