@@ -167,7 +167,7 @@ def __repr__(self) -> str:
167167 return f"<_DbfsIO { self ._path } { 'read' if self .readable () else 'write' } =True>"
168168
169169
170- class _FilesIO (BinaryIO ):
170+ class _VolumesIO (BinaryIO ):
171171
172172 def __init__ (self , api : files .FilesAPI , path : str , * , read : bool , write : bool , overwrite : bool ):
173173 self ._buffer = []
@@ -262,7 +262,7 @@ def __exit__(self, __t, __value, __traceback):
262262 self .close ()
263263
264264 def __repr__ (self ) -> str :
265- return f"<_FilesIO { self ._path } { 'read' if self .readable () else 'write' } =True>"
265+ return f"<_VolumesIO { self ._path } { 'read' if self .readable () else 'write' } =True>"
266266
267267
268268class _Path (ABC ):
@@ -398,7 +398,7 @@ def __repr__(self) -> str:
398398 return f'<_LocalPath { self ._path } >'
399399
400400
401- class _FilesPath (_Path ):
401+ class _VolumesPath (_Path ):
402402
403403 def __init__ (self , api : files .FilesAPI , src : Union [str , pathlib .Path ]):
404404 self ._path = pathlib .PurePosixPath (str (src ).replace ('dbfs:' , '' ).replace ('file:' , '' ))
@@ -411,7 +411,7 @@ def _is_dbfs(self) -> bool:
411411 return False
412412
413413 def child (self , path : str ) -> Self :
414- return _FilesPath (self ._api , str (self ._path / path ))
414+ return _VolumesPath (self ._api , str (self ._path / path ))
415415
416416 def _is_dir (self ) -> bool :
417417 try :
@@ -431,7 +431,7 @@ def exists(self) -> bool:
431431 return self .is_dir
432432
433433 def open (self , * , read = False , write = False , overwrite = False ) -> BinaryIO :
434- return _FilesIO (self ._api , self .as_string , read = read , write = write , overwrite = overwrite )
434+ return _VolumesIO (self ._api , self .as_string , read = read , write = write , overwrite = overwrite )
435435
436436 def list (self , * , recursive = False ) -> Generator [files .FileInfo , None , None ]:
437437 if not self .is_dir :
@@ -458,13 +458,13 @@ def list(self, *, recursive=False) -> Generator[files.FileInfo, None, None]:
458458 def delete (self , * , recursive = False ):
459459 if self .is_dir :
460460 for entry in self .list (recursive = False ):
461- _FilesPath (self ._api , entry .path ).delete (recursive = True )
461+ _VolumesPath (self ._api , entry .path ).delete (recursive = True )
462462 self ._api .delete_directory (self .as_string )
463463 else :
464464 self ._api .delete (self .as_string )
465465
466466 def __repr__ (self ) -> str :
467- return f'<_FilesPath { self ._path } >'
467+ return f'<_VolumesPath { self ._path } >'
468468
469469
470470class _DbfsPath (_Path ):
@@ -589,8 +589,8 @@ def _path(self, src):
589589 'UC Volumes paths, not external locations or DBFS mount points.' )
590590 if src .scheme == 'file' :
591591 return _LocalPath (src .geturl ())
592- if src .path .startswith (( '/Volumes' , '/Models' ) ):
593- return _FilesPath (self ._files_api , src .geturl ())
592+ if src .path .startswith ('/Volumes' ):
593+ return _VolumesPath (self ._files_api , src .geturl ())
594594 return _DbfsPath (self ._dbfs_api , src .geturl ())
595595
596596 def copy (self , src : str , dst : str , * , recursive = False , overwrite = False ):
0 commit comments