@@ -122,14 +122,18 @@ def mv_file(self, path1, path2, **kwargs):
122
122
shutil .move (path1 , path2 )
123
123
124
124
def rm (self , path , recursive = False , maxdepth = None ):
125
- path = self . _strip_protocol (path ). rstrip ( "/" )
126
- if recursive and self . isdir ( path ):
125
+ if isinstance (path , str ):
126
+ path = [ path ]
127
127
128
- if os .path .abspath (path ) == os .getcwd ():
129
- raise ValueError ("Cannot delete current working directory" )
130
- shutil .rmtree (path )
131
- else :
132
- os .remove (path )
128
+ for p in path :
129
+ p = self ._strip_protocol (p ).rstrip ("/" )
130
+ if recursive and self .isdir (p ):
131
+
132
+ if os .path .abspath (p ) == os .getcwd ():
133
+ raise ValueError ("Cannot delete current working directory" )
134
+ shutil .rmtree (p )
135
+ else :
136
+ os .remove (p )
133
137
134
138
def _open (self , path , mode = "rb" , block_size = None , ** kwargs ):
135
139
path = self ._strip_protocol (path )
@@ -177,7 +181,7 @@ def _isfilestore(self):
177
181
178
182
179
183
def make_path_posix (path , sep = os .sep ):
180
- """ Make path generic """
184
+ """Make path generic"""
181
185
if isinstance (path , (list , set , tuple )):
182
186
return type (path )(make_path_posix (p ) for p in path )
183
187
if "~" in path :
0 commit comments