(self, file_path, index=-1)
return file_name.strip("/")
Recursively extract name of the file from the path.

        Args:
            file_path (str): Path of the file
            index (int): Index of the file name

        Raises:
            None

        Returns:
            file_name (str): Name of the file
Recursively extract name of the file from the path.
Recursively extract name of the file from the path .
def get_file_name(self, file_path, index=-1):
        # sourcery skip: remove-unnecessary-else, swap-if-else-branches
        """
        Recursively extract name of the file from the path.

        Args:
            file_path (str): Path of the file
            index (int): Index of the file name

        Raises:
            None

        Returns:
            file_name (str): Name of the file
        """
        file_name = file_path.split("/")[index:]
        file_name = "/".join(file_name)
        if file_name in self.file_names:
            return self.get_file_name(file_path, index=index-1)

        self.file_names.append(file_name)
        return file_name.strip("/")
def get_file_name ( self , file_path , index = - 1 ) : # sourcery skip: remove-unnecessary-else, swap-if-else-branches file_name = file_path . split ( "/" ) [ index : ] file_name = "/" . join ( file_name ) if file_name in self . file_names : return self . get_file_name ( file_path , index = index - 1 ) self . file_names . append ( file_name ) return file_name . strip ( "/" )