You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
293 B
TypeScript
12 lines
293 B
TypeScript
4 years ago
|
import child from 'child_process';
|
||
|
import fs from 'fs-extra';
|
||
|
|
||
|
export function mount(path: string, size = '32m') {
|
||
|
fs.ensureDirSync(path);
|
||
|
child.execSync(`mount tmpfs ${path} -t tmpfs -o size=${size}`);
|
||
|
}
|
||
|
|
||
|
export function umount(path: string) {
|
||
|
child.execSync(`umount ${path}`);
|
||
|
}
|