utils.os¶
Collection of os-related utilities.
-
ximpol.utils.os_.check_input_file(file_path, extension=None)[source]¶ Make sure that an input file exists (and, optionally, has the right extension).
Note that we abort the execution with no mercy if anything fails.
-
ximpol.utils.os_.cp(source, dest, create_tree=False)[source]¶ Copy a file.
Return 0 upon succesfull operation, 1 otherwise.
-
ximpol.utils.os_.mkdir(dir_path)[source]¶ Create a directory (unless it already exists).
Return 0 upon succesfull operation, 1 otherwise.
-
ximpol.utils.os_.mv(source, dest)[source]¶ Move a file.
Return 0 upon succesfull operation, 1 otherwise.