forked from noxious/server
Added logging, worked on character type management
This commit is contained in:
@ -17,17 +17,17 @@ export function getPublicPath(folder: string, ...additionalSegments: string[]) {
|
||||
|
||||
export function doesPathExist(path: string) {
|
||||
try {
|
||||
fs.accessSync(path, fs.constants.F_OK);
|
||||
return true;
|
||||
fs.accessSync(path, fs.constants.F_OK)
|
||||
return true
|
||||
} catch (e) {
|
||||
return false;
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
export function createDir(path: string) {
|
||||
try {
|
||||
fs.mkdirSync(path, { recursive: true });
|
||||
fs.mkdirSync(path, { recursive: true })
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
console.error(e)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user