mirror of
https://github.com/unraid/api.git
synced 2026-05-02 21:22:04 -05:00
010efe75bd
This reverts commit 4ef387b5bb.
10 lines
199 B
TypeScript
10 lines
199 B
TypeScript
import { readFileSync } from 'fs';
|
|
|
|
export const attemptReadFileSync = (path: string, fallback: any = undefined) => {
|
|
try {
|
|
return readFileSync(path, 'utf-8');
|
|
} catch {
|
|
return fallback;
|
|
}
|
|
};
|