sksurgerycore.utilities.validate_file module

Various file utilities, often calling standard functions in the os package, but throwing nice informative Exception messages.

sksurgerycore.utilities.validate_file.validate_is_file(file_name)[source]

Check if file_name is a file.

Parameters:file_name – string containing path name
Raises:TypeError if not string, ValueError if not file
Returns:True
sksurgerycore.utilities.validate_file.validate_is_writable_file(file_name)[source]

Check if file_name is a writable file.

Parameters:file_name – string containing path name
Raises:TypeError if not string, ValueError if not file
Returns:True