sertit.files.listdir_abspath

listdir_abspath(directory: Union[str, cloudpathlib.cloudpath.CloudPath, pathlib.Path]) list[source]

Get absolute path of all files in the given directory.

It is the same function than os.listdir but returning absolute paths.

>>> folder = "."
>>> listdir_abspath(folder)
['D:\_SERTIT_UTILS\sertit-utils\sertit\files.py',
'D:\_SERTIT_UTILS\sertit-utils\sertit\logs.py',
'D:\_SERTIT_UTILS\sertit-utils\sertit\misc.py',
'D:\_SERTIT_UTILS\sertit-utils\sertit\network.py',
'D:\_SERTIT_UTILS\sertit-utils\sertit\rasters_rio.py',
'D:\_SERTIT_UTILS\sertit-utils\sertit\strings.py',
'D:\_SERTIT_UTILS\sertit-utils\sertit\vectors.py',
'D:\_SERTIT_UTILS\sertit-utils\sertit\version.py',
'D:\_SERTIT_UTILS\sertit-utils\sertit\__init__.py']
Parameters

directory (Union[str, CloudPath, Path]) – Relative or absolute path to the directory to be scanned

Returns

Absolute path of all files in the given directory

Return type

str