MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / OSPath

Function OSPath

tools/targets/eclipse.py:32–44  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

30
31
32def OSPath(path):
33 import platform
34
35 if type(path) == type('str'):
36 if platform.system() == 'Windows':
37 return path.replace('/', '\\')
38 else:
39 return path.replace('\\', '/')
40 else:
41 if platform.system() == 'Windows':
42 return [item.replace('/', '\\') for item in path]
43 else:
44 return [item.replace('\\', '/') for item in path]
45
46
47# collect the build source code path and parent path

Callers 3

ExcludeFilesFunction · 0.85
ExcludePathsFunction · 0.85
GenExcludingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected