mirror of
https://github.com/sasjs/server.git
synced 2025-12-10 19:34:34 +00:00
15 lines
474 B
TypeScript
15 lines
474 B
TypeScript
import { createFile, createFolder, fileExists } from '@sasjs/utils'
|
|
import { getDesktopUserAutoExecPath, getFilesFolder } from './file'
|
|
import { ModeType } from './verifyEnvVariables'
|
|
|
|
export const setupFolders = async () => {
|
|
const drivePath = getFilesFolder()
|
|
await createFolder(drivePath)
|
|
|
|
if (process.env.MODE === ModeType.Desktop) {
|
|
if (!(await fileExists(getDesktopUserAutoExecPath()))) {
|
|
await createFile(getDesktopUserAutoExecPath(), '')
|
|
}
|
|
}
|
|
}
|