File tree 2 files changed +26
-0
lines changed
2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,13 @@ static function fileExists($file){
24
24
return file_exists ($ file );
25
25
}
26
26
27
+ /*
28
+ * returns the if a file exists
29
+ */
30
+ static function isFile ($ file ){
31
+ return is_file ($ file );
32
+ }
33
+
27
34
/*
28
35
* returns the if a file exists
29
36
*/
Original file line number Diff line number Diff line change
1
+ <?php
2
+ function rmMain ($ args , $ command ){
3
+ lCommand::write ("> $ command " );
4
+ if (count ($ args )==1 ){
5
+ $ file = lSystem::getPWD ()."/ " .$ args [0 ];
6
+ if (lSystem::fileExists ($ file )){
7
+ if (lSystem::isFile ($ file )){
8
+ unlink ($ file );
9
+ }else {
10
+ lCommand::write ("this is a directory and cannot be removed with this command " );
11
+ }
12
+ }else {
13
+ lCommand::write ("this file does not exists " );
14
+ }
15
+ }else {
16
+ lCommand::write ("to remove a file, call \"rm [file] \"" );
17
+ }
18
+ }
19
+ ?>
You can’t perform that action at this time.
0 commit comments