File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,7 @@ def __init__(self,
8282 self .uri = uri or ''
8383 self .name = name or ''
8484 self .metadata = metadata or {}
85+ self .custom_path : str = ''
8586
8687 @property
8788 def path (self ) -> str :
@@ -92,6 +93,8 @@ def path(self, path: str) -> None:
9293 self ._set_path (path )
9394
9495 def _get_path (self ) -> Optional [str ]:
96+ if self .custom_path != "" :
97+ return self .custom_path
9598 if self .uri .startswith (RemotePrefix .GCS .value ):
9699 return _GCS_LOCAL_MOUNT_PREFIX + self .uri [len (RemotePrefix .GCS .value
97100 ):]
@@ -111,6 +114,16 @@ def _get_path(self) -> Optional[str]:
111114 def _set_path (self , path : str ) -> None :
112115 self .uri = convert_local_path_to_remote_path (path )
113116
117+ @property
118+ def custom_path (self ) -> str :
119+ return self .custom_path
120+
121+ @custom_path .setter
122+ def custom_path (self , value ):
123+ self ._set_custom_path = value
124+
125+ def _set_custom_path (self , path : str ) -> None :
126+ self .custom_path = path
114127
115128def convert_local_path_to_remote_path (path : str ) -> str :
116129 if path .startswith (_GCS_LOCAL_MOUNT_PREFIX ):
You can’t perform that action at this time.
0 commit comments