MCPcopy
hub / github.com/pythongosssss/ComfyUI-Custom-Scripts / link_js

Function link_js

pysssss.py:93–109  ·  view source on GitHub ↗
(src, dst)

Source from the content-addressed store, hash-verified

91
92
93def link_js(src, dst):
94 src = os.path.abspath(src)
95 dst = os.path.abspath(dst)
96 if os.name == "nt":
97 try:
98 import _winapi
99 _winapi.CreateJunction(src, dst)
100 return True
101 except:
102 pass
103 try:
104 os.symlink(src, dst)
105 return True
106 except:
107 import logging
108 logging.exception('')
109 return False
110
111
112def is_junction(path):

Callers 1

install_jsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected