Last change
on this file since ceaed42 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
377 bytes
|
Line | |
---|
1 | import { readFileSync, statSync, writeFile } from 'fs';
|
---|
2 | import { format } from 'util';
|
---|
3 | import { resolve } from 'path';
|
---|
4 | export default {
|
---|
5 | fs: {
|
---|
6 | readFileSync,
|
---|
7 | writeFile
|
---|
8 | },
|
---|
9 | format,
|
---|
10 | resolve,
|
---|
11 | exists: (file) => {
|
---|
12 | try {
|
---|
13 | return statSync(file).isFile();
|
---|
14 | }
|
---|
15 | catch (err) {
|
---|
16 | return false;
|
---|
17 | }
|
---|
18 | }
|
---|
19 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.