mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-10-30 05:15:13 +08:00
🎨 Sync 2026-04-10 15:34:26
This commit is contained in:
1 parent
9b1a57d792
commit
42174fc0b0
66 files changed
+6841
-2210
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import { readfile, popen } from 'fs';
|
||||
import { readfile, writefile, popen } from 'fs';
|
||||
|
||||
export function get_paths() {
|
||||
let result = {};
|
||||
@@ -120,4 +120,14 @@ export function get_cgroups() {
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
export function load_profile() {
|
||||
const paths = get_paths();
|
||||
return json(readfile(paths.run_profile_path));
|
||||
};
|
||||
|
||||
export function save_profile(obj) {
|
||||
const paths = get_paths();
|
||||
return writefile(paths.run_profile_path, obj);
|
||||
};
|
||||
Reference in new issue
Block a user