Checks if a given path string represents an existing directory.
Returns true if the path exists and is a directory, false otherwise.
Returns a PathBuf representing a directory path.
Maps a FileExtension enum variant to its corresponding file extension string.
Returns png, jpg, or jpeg.
Generates a file path string with a random component in the filename.
Constructs the path from the given filename, path, and extension.
Ensures unique filenames.
Obtains the workspace directory. Typically the current working directory.
Errors are propagated from get_current_working_dir.