MCPcopy Create free account
hub / github.com/dbcli/mycli / dir_path_exists

Function dir_path_exists

mycli/packages/filepaths.py:100–110  ·  view source on GitHub ↗

Check if the directory path exists for a given file. For example, for a file /home/user/.cache/mycli/log, check if /home/user/.cache/mycli exists. :param str path: The file path. :return: Whether or not the directory path exists.

(path: str)

Source from the content-addressed store, hash-verified

98
99
100def dir_path_exists(path: str) -> bool:
101 """Check if the directory path exists for a given file.
102
103 For example, for a file /home/user/.cache/mycli/log, check if
104 /home/user/.cache/mycli exists.
105
106 :param str path: The file path.
107 :return: Whether or not the directory path exists.
108
109 """
110 return os.path.exists(os.path.dirname(path))
111
112
113def guess_socket_location() -> str | None:

Callers 2

initialize_loggingMethod · 0.90
_create_historyFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected