@@ -33,7 +33,6 @@ class AbstractFileBasedStreamReader(ABC):
3333 FILE_RELATIVE_PATH = "file_relative_path"
3434 FILE_NAME = "file_name"
3535 LOCAL_FILE_PATH = "local_file_path"
36- SOURCE_FILE_URI = "source_file_relative_path"
3736 FILE_FOLDER = "file_folder"
3837
3938 def __init__ (self ) -> None :
@@ -177,8 +176,16 @@ def upload(
177176 ...
178177
179178 def _get_file_transfer_paths (
180- self , source_file_relative_path : str , local_directory : str
179+ self , source_file_relative_path : str , staging_directory : str
181180 ) -> MutableMapping [str , Any ]:
181+ """
182+ This method is used to get the file transfer paths for a given source file relative path and local directory.
183+ It returns a dictionary with the following keys:
184+ - FILE_RELATIVE_PATH: The relative path to file in reference to the staging directory.
185+ - LOCAL_FILE_PATH: The absolute path to the file.
186+ - FILE_NAME: The name of the referenced file.
187+ - FILE_FOLDER: The folder of the referenced file.
188+ """
182189 preserve_directory_structure = self .preserve_directory_structure ()
183190
184191 file_name = path .basename (source_file_relative_path )
@@ -188,7 +195,7 @@ def _get_file_transfer_paths(
188195 file_relative_path = source_file_relative_path .lstrip ("/" )
189196 else :
190197 file_relative_path = file_name
191- local_file_path = path .join (local_directory , file_relative_path )
198+ local_file_path = path .join (staging_directory , file_relative_path )
192199 # Ensure the local directory exists
193200 makedirs (path .dirname (local_file_path ), exist_ok = True )
194201
0 commit comments