repositories
/
e-mobility-charging-stations-simulator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
README.md: document missing UI protocol commands
[e-mobility-charging-stations-simulator.git]
/
src
/
utils
/
FileUtils.ts
diff --git
a/src/utils/FileUtils.ts
b/src/utils/FileUtils.ts
index e36e85f73f5b11393899e4f8f9d83cf36dd346e5..10317c7353f4855a4a0f24ecb42d809b5f0b1f03 100644
(file)
--- a/
src/utils/FileUtils.ts
+++ b/
src/utils/FileUtils.ts
@@
-1,11
+1,13
@@
+import fs from 'fs';
+
+import chalk from 'chalk';
+
import { EmptyObject } from '../types/EmptyObject';
import { EmptyObject } from '../types/EmptyObject';
-import { FileType } from '../types/FileType';
import { HandleErrorParams } from '../types/Error';
import { HandleErrorParams } from '../types/Error';
+import { FileType } from '../types/FileType';
import { JsonType } from '../types/JsonType';
import { JsonType } from '../types/JsonType';
-import Utils from './Utils';
-import chalk from 'chalk';
-import fs from 'fs';
import logger from './Logger';
import logger from './Logger';
+import Utils from './Utils';
export default class FileUtils {
private constructor() {
export default class FileUtils {
private constructor() {
@@
-58,7
+60,7
@@
export default class FileUtils {
error
);
} else {
error
);
} else {
- logger.warn(prefix + fileType + ' file ' + file + ' not found:
%j
', error);
+ logger.warn(prefix + fileType + ' file ' + file + ' not found:', error);
}
} else if (error.code === 'EEXIST') {
if (params?.consoleOut) {
}
} else if (error.code === 'EEXIST') {
if (params?.consoleOut) {
@@
-67,7
+69,7
@@
export default class FileUtils {
error
);
} else {
error
);
} else {
- logger.warn(prefix + fileType + ' file ' + file + ' already exists:
%j
', error);
+ logger.warn(prefix + fileType + ' file ' + file + ' already exists:', error);
}
} else if (error.code === 'EACCES') {
if (params?.consoleOut) {
}
} else if (error.code === 'EACCES') {
if (params?.consoleOut) {
@@
-76,7
+78,7
@@
export default class FileUtils {
error
);
} else {
error
);
} else {
- logger.warn(prefix + fileType + ' file ' + file + ' access denied:
%j
', error);
+ logger.warn(prefix + fileType + ' file ' + file + ' access denied:', error);
}
} else {
if (params?.consoleOut) {
}
} else {
if (params?.consoleOut) {
@@
-85,7
+87,7
@@
export default class FileUtils {
error
);
} else {
error
);
} else {
- logger.warn(prefix + fileType + ' file ' + file + ' error:
%j
', error);
+ logger.warn(prefix + fileType + ' file ' + file + ' error:', error);
}
if (params?.throwError) {
throw error;
}
if (params?.throwError) {
throw error;