listdir_abspath#
- listdir_abspath(directory: str | CloudPath | Path) list [source]#
Get absolute path of all files in the given directory.
It is the same function as
os.listdir
but returning absolute paths.- Parameters:
directory (AnyPathStrType) – Relative or absolute path to the directory to be scanned
- Returns:
Absolute path of all files in the given directory
- Return type:
Example
>>> 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']