22 lines
364 B
TypeScript
22 lines
364 B
TypeScript
import * as fs from 'fs';
|
|
import { RJLog } from '../log/RJLog';
|
|
|
|
export class FilesSync
|
|
{
|
|
static loadUTF8( filePath:string ):string
|
|
{
|
|
try
|
|
{
|
|
let data = fs.readFileSync( filePath );
|
|
let stringData = data.toString();
|
|
return stringData;
|
|
}
|
|
catch ( exception )
|
|
{
|
|
RJLog.log( exception );
|
|
}
|
|
|
|
return null;
|
|
|
|
}
|
|
} |