aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/tools/myriadfs.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/tools/myriadfs.cpp b/src/tools/myriadfs.cpp
index c6dd416..587bc89 100644
--- a/src/tools/myriadfs.cpp
+++ b/src/tools/myriadfs.cpp
@@ -20,6 +20,7 @@ enum Mode
20 modeCopyOut, 20 modeCopyOut,
21 modeMkdir, 21 modeMkdir,
22 modeInitialize, 22 modeInitialize,
23 modeRm,
23 24
24 modeNone 25 modeNone
25}; 26};
@@ -67,6 +68,8 @@ public:
67 eMode = modeMkdir; 68 eMode = modeMkdir;
68 else if( aParams[0] == "initialize" ) 69 else if( aParams[0] == "initialize" )
69 eMode = modeInitialize; 70 eMode = modeInitialize;
71 else if( aParams[0] == "rm" )
72 eMode = modeRm;
70 else 73 else
71 Bu::println("Unknown command, try --help"); 74 Bu::println("Unknown command, try --help");
72 return 0; 75 return 0;
@@ -247,6 +250,17 @@ int main( int argc, char *argv[] )
247 Bu::println("MyriadFs initialized.\n"); 250 Bu::println("MyriadFs initialized.\n");
248 break; 251 break;
249 252
253 case modeRm:
254 {
255 if( opt.lParams.getSize() != 1 )
256 {
257 Bu::println("Specify a file path.");
258 return 1;
259 }
260 mFs.unlink( opt.lParams.first() );
261 }
262 break;
263
250 case modeNone: 264 case modeNone:
251 break; 265 break;
252 } 266 }