@@ -641,7 +641,7 @@ def makedir(self, path, recursive=False, allow_recreate=False):
641641 """
642642 raise UnsupportedError ("make directory" )
643643
644- def remove (self , path ):
644+ def remove (self , path , ** kwargs ):
645645 """Remove a file from the filesystem.
646646
647647 :param path: Path of the resource to remove
@@ -654,7 +654,7 @@ def remove(self, path):
654654 """
655655 raise UnsupportedError ("remove resource" )
656656
657- def removedir (self , path , recursive = False , force = False ):
657+ def removedir (self , path , recursive = False , force = False , ** kwargs ):
658658 """Remove a directory from the filesystem
659659
660660 :param path: path of the directory to remove
@@ -803,7 +803,7 @@ def _setcontents(self,
803803 chunk_size = 1024 * 64 ,
804804 progress_callback = None ,
805805 finished_callback = None ,
806- bypass_lock = False ):
806+ ** kwargs ):
807807 """Does the work of setcontents. Factored out, so that `setcontents_async` can use it"""
808808 if progress_callback is None :
809809 progress_callback = lambda bytes_written : None
@@ -824,9 +824,9 @@ def _setcontents(self,
824824 chunk = read (chunk_size )
825825 if isinstance (chunk , six .text_type ):
826826 f = self .open (path , 'wt' , encoding = encoding , errors = errors ,
827- bypass_lock = bypass_lock )
827+ ** kwargs )
828828 else :
829- f = self .open (path , 'wb' , bypass_lock = bypass_lock )
829+ f = self .open (path , 'wb' , ** kwargs )
830830 write = f .write
831831 try :
832832 while chunk :
@@ -851,7 +851,7 @@ def _setcontents(self,
851851 return bytes_written
852852
853853 def setcontents (self , path , data = b'' , encoding = None , errors = None ,
854- chunk_size = 1024 * 64 , bypass_lock = False ):
854+ chunk_size = 1024 * 64 , ** kwargs ):
855855 """A convenience method to create a new file from a string or file-like object
856856
857857 :param path: a path of the file to create
@@ -861,7 +861,7 @@ def setcontents(self, path, data=b'', encoding=None, errors=None,
861861 :param chunk_size: Number of bytes to read in a chunk, if the implementation has to resort to a read / copy loop
862862
863863 """
864- return self ._setcontents (path , data , encoding = encoding , errors = errors , chunk_size = 1024 * 64 , bypass_lock = bypass_lock )
864+ return self ._setcontents (path , data , encoding = encoding , errors = errors , chunk_size = 1024 * 64 , ** kwargs )
865865
866866 def setcontents_async (self ,
867867 path ,
@@ -1113,7 +1113,7 @@ def getsize(self, path):
11131113 raise OperationFailedError ("get size of resource" , path )
11141114 return size
11151115
1116- def copy (self , src , dst , overwrite = False , chunk_size = 1024 * 64 ):
1116+ def copy (self , src , dst , overwrite = False , chunk_size = 1024 * 64 , ** kwargs ):
11171117 """Copies a file from src to dst.
11181118
11191119 :param src: the source path
@@ -1213,7 +1213,8 @@ def move(self, src, dst, overwrite=False, chunk_size=16384):
12131213 bypass_lock = True )
12141214 self .remove (src , bypass_lock = True )
12151215
1216- def movedir (self , src , dst , overwrite = False , ignore_errors = False , chunk_size = 16384 ):
1216+ def movedir (self , src , dst , overwrite = False , ignore_errors = False ,
1217+ chunk_size = 16384 , ** kwargs ):
12171218 """moves a directory from one location to another.
12181219
12191220 :param src: source directory path
0 commit comments