crops.iomod package¶
Input/output functions.
-
check_path(path, typeofpath=None)[source]¶ Return full path if correct.
Parameters: Raises: - ValueError – If given typeofpath is neither ‘dir’ nor ‘file’.
- argparse – If given path is not found.
Returns: Absolute path.
Return type:
-
outpathgen(globaldir, subdir=None, filename=None, mksubdir=False)[source]¶ Build a filepath in an existing directory and create subdirectory if requested.
Parameters: Raises: FileNotFoundError – If directory does not exist and mksubdir is False.
Returns: Output filepath.
Return type: