MCPcopy
hub / github.com/xpf0000/FlyEnv / SetupGlobalPaths

Function SetupGlobalPaths

src/main/utils/ServerPath.ts:46–68  ·  view source on GitHub ↗
(runpath: string)

Source from the content-addressed store, hash-verified

44 * 设置全局路径
45 */
46export const SetupGlobalPaths = (runpath: string) => {
47 global.Server.UserHome = app.getPath('home')
48 global.Server.isArmArch = isArmArch()
49 global.Server.BaseDir = join(runpath, 'server')
50 global.Server.AppDir = join(runpath, 'app')
51 global.Server.NginxDir = join(runpath, 'server/nginx')
52 global.Server.PhpDir = join(runpath, 'server/php')
53 global.Server.MysqlDir = join(runpath, 'server/mysql')
54 global.Server.MariaDBDir = join(runpath, 'server/mariadb')
55 global.Server.ApacheDir = join(runpath, 'server/apache')
56 global.Server.MemcachedDir = join(runpath, 'server/memcached')
57 global.Server.RedisDir = join(runpath, 'server/redis')
58 global.Server.MongoDBDir = join(runpath, 'server/mongodb')
59 global.Server.FTPDir = join(runpath, 'server/ftp')
60 global.Server.PostgreSqlDir = join(runpath, 'server/postgresql')
61 global.Server.Cache = join(runpath, 'server/cache')
62 global.Server.Static = __static
63 global.Server.Arch = arch() === 'x64' ? 'x86_64' : 'arm64'
64 global.Server.isMacOS = isMacOS()
65 global.Server.isLinux = isLinux()
66 global.Server.isWindows = isWindows()
67 MakeServerDir()
68}

Callers 1

initServerDirMethod · 0.90

Calls 5

isArmArchFunction · 0.90
isMacOSFunction · 0.90
isLinuxFunction · 0.90
isWindowsFunction · 0.90
MakeServerDirFunction · 0.85

Tested by

no test coverage detected