lisc.io.db.check_directory

lisc.io.db.check_directory(directory, folder=None)[source]

Check and extract a file path.

Parameters
directorySCDB or str or Path or None

A string or object containing a file path.

folderstr, optional

Which folder path to extract. Only used if directory is a SCDB object.

Returns
pathPath

File path for the desired folder.

Notes

The output of this function depends on the input, as:

  • If the input is an SCDB object, returns a file path as a string.

  • If the input is already a string, returns the input.

  • If the input is None, returns an empty string.