2025-11-11 10:58:11 +00:00
|
|
|
import * as fs from 'fs';
|
|
|
|
|
import { RJLog } from '../log/RJLog';
|
|
|
|
|
|
2025-03-31 12:00:55 +00:00
|
|
|
export class FilesSync
|
|
|
|
|
{
|
2025-11-11 10:58:11 +00:00
|
|
|
static loadUTF8( filePath:string ):string
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
let data = fs.readFileSync( filePath );
|
|
|
|
|
let stringData = data.toString();
|
|
|
|
|
return stringData;
|
|
|
|
|
}
|
|
|
|
|
catch ( exception )
|
|
|
|
|
{
|
|
|
|
|
RJLog.log( exception );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
|
|
}
|
2025-03-31 12:00:55 +00:00
|
|
|
}
|