ssapy_toolkit.IO.io_utils

Functions

allfiles([dirName])

Get a list of all files in the directory tree starting at the given path.

exists(pathname)

Check if a given path is either a file or a directory.

file_exists(filename)

Check if a file with the given name exists (including its extensions).

get_image_paths(folder_path[, sort_by_number])

Returns a list of full paths for all image files in the specified folder.

listdir([dir_path, files_only, exclude, do_sort])

List files in a directory, with options to filter, exclude, and sort.

mkdir(pathname)

Create a directory if it does not already exist.

mvdir(source_, destination_)

Move a directory from the source path to the destination path.

pd_flatten(data[, factor])

Flatten a list of data by splitting string elements like '[1,2,3]' and converting them into floats.

pdstr_to_arrays(df)

Apply str_to_array to each element of a DataFrame and convert it to a NumPy array of arrays.

rmdir(source_)

Remove a directory and its contents.

rmfile(pathname)

Remove a file if it exists.

str_to_array(s)

Convert a string representation of a list (e.g., '[1, 2, 3]') into a NumPy array of floats.

ssapy_toolkit.IO.io_utils.allfiles(dirName: str = '/home/docs/checkouts/readthedocs.org/user_builds/ssapy-toolkit/checkouts/latest/docs') list[source]

Get a list of all files in the directory tree starting at the given path.

ssapy_toolkit.IO.io_utils.exists(pathname: str) bool[source]

Check if a given path is either a file or a directory.

ssapy_toolkit.IO.io_utils.file_exists(filename: str) bool[source]

Check if a file with the given name exists (including its extensions).

ssapy_toolkit.IO.io_utils.get_image_paths(folder_path: str, sort_by_number: bool = True) list[source]

Returns a list of full paths for all image files in the specified folder.

ssapy_toolkit.IO.io_utils.listdir(dir_path: str = '*', files_only: bool = False, exclude: str = None, do_sort: bool = True) list[source]

List files in a directory, with options to filter, exclude, and sort.

ssapy_toolkit.IO.io_utils.mkdir(pathname: str) None[source]

Create a directory if it does not already exist.

ssapy_toolkit.IO.io_utils.mvdir(source_: str, destination_: str) None[source]

Move a directory from the source path to the destination path.

ssapy_toolkit.IO.io_utils.pd_flatten(data: list, factor: float = 1) list[source]

Flatten a list of data by splitting string elements like ‘[1,2,3]’ and converting them into floats. Divides each float by factor.

ssapy_toolkit.IO.io_utils.pdstr_to_arrays(df) ndarray[source]

Apply str_to_array to each element of a DataFrame and convert it to a NumPy array of arrays.

ssapy_toolkit.IO.io_utils.rmdir(source_: str) None[source]

Remove a directory and its contents.

ssapy_toolkit.IO.io_utils.rmfile(pathname: str) None[source]

Remove a file if it exists.

ssapy_toolkit.IO.io_utils.str_to_array(s: str) ndarray[source]

Convert a string representation of a list (e.g., ‘[1, 2, 3]’) into a NumPy array of floats.