MCPcopy Create free account
hub / github.com/PaulleDemon/PyUIBuilder / getPythonAssetPath

Function getPythonAssetPath

src/frameworks/utils/pythonFilePath.js:3–26  ·  view source on GitHub ↗
(fileName, fileType)

Source from the content-addressed store, hash-verified

1
2
3export function getPythonAssetPath(fileName, fileType){
4
5 let assetPath = "others"
6
7 switch (fileType) {
8 case "image":
9 assetPath = "images"
10 break
11
12 case "video":
13 assetPath = "videos"
14 break
15
16 case "audio":
17 assetPath = "audios"
18 break
19
20 default:
21 break
22 }
23
24 return `os.path.join("assets", "${assetPath}", "${fileName}")`
25
26}

Callers 10

generateCodeFunction · 0.90
generateCodeFunction · 0.90
generateCodeFunction · 0.90
generateCodeMethod · 0.90
generateCodeMethod · 0.90
generateCodeMethod · 0.90
generateCodeMethod · 0.90
generateCodeFunction · 0.90
generateCodeMethod · 0.90
generateCodeMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected