MCPcopy Create free account
hub / github.com/CodeClash-ai/CodeClash / get_parent_folder

Function get_parent_folder

codeclash/viewer/app.py:970–979  ·  view source on GitHub ↗

Extract the parent folder name from a path

(path)

Source from the content-addressed store, hash-verified

968
969
970def get_parent_folder(path):
971 """Extract the parent folder name from a path"""
972 if not path:
973 return ""
974 from pathlib import Path
975
976 parent = Path(path).parent
977 if str(parent) == "." or str(parent) == "/":
978 return ""
979 return parent.name
980
981
982def format_timestamp(timestamp):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected