@@ -308,7 +308,7 @@ def write_files(self, files: List[Dict[str, str]]) -> None:
308308 path = file_info ["path" ]
309309 content = file_info ["content" ]
310310 encoding = file_info .get ("encoding" , "utf-8" )
311- self .write_file (path , content , encoding )
311+ SandboxFilesystem .write_file (self , path , content , encoding )
312312
313313 def exists (self , path : str ) -> bool :
314314 """Check if file/directory exists synchronously"""
@@ -352,7 +352,7 @@ def upload_file(
352352 with open (local_path , "rb" ) as f :
353353 content_bytes = f .read ()
354354
355- self .write_file (remote_path , content_bytes , encoding = encoding )
355+ SandboxFilesystem .write_file (self , remote_path , content_bytes , encoding = encoding )
356356
357357 def download_file (
358358 self , remote_path : str , local_path : str , encoding : str = "utf-8"
@@ -368,7 +368,7 @@ def download_file(
368368 Raises:
369369 SandboxFileNotFoundError: If remote file doesn't exist
370370 """
371- file_info = self .read_file (remote_path , encoding = encoding )
371+ file_info = SandboxFilesystem .read_file (self , remote_path , encoding = encoding )
372372
373373 if isinstance (file_info .content , bytes ):
374374 content_bytes = file_info .content
@@ -388,7 +388,7 @@ def ls(self, path: str = ".") -> List[str]:
388388 Returns:
389389 List of file/directory names
390390 """
391- return self .list_dir (path )
391+ return SandboxFilesystem .list_dir (self , path )
392392
393393 def rm (self , path : str , recursive : bool = False ) -> None :
394394 """
0 commit comments