check_directory_by_file_path

swpy.lib.utilities.check_directory_by_file_path(file_path)

It examines the directory path in file_path and creates directories that do not exist. There must be no ‘/’ after file_path.

Parameters

file_path (str) – Directory path.

Returns

bool – True/False (Success/Fail)

Examples

>>> check_directory_by_file_path("./dir1/dir2/filename.txt")