UNPKG

md-curcuma

Version:

A Typescript library for transporting and converting markdown and other data.

29 lines (28 loc) 1.68 kB
import * as fs from "fs"; import * as XLSX from "xlsx"; import { IOable } from "../io/types"; export declare class Filesystem { static copy_file(source: string, target: string, simulate?: boolean): void; static isFolder(my_path: string): boolean; static isFile(my_path: string): boolean; static is_file_exist(my_path: string): boolean; static is_file_modified(file_source: string, file_target: string): boolean; static get_file_info(file: string): fs.Stats; static get_filename_base_from(my_path_filename: string): string; static get_filename_ext_from(my_path_filename: string): string; static get_filename_name_from(my_path_filename: string): string; static get_path_from(my_path_filename: string): string; static concat_path_filename(my_path: string, my_filename: string): string; static ensure_path(my_path: string, simulate?: boolean): void; static get_path_parts(my_path: string): string[]; static get_path_depth(my_path: string): number; static get_files_list(dir: string, files?: Array<string>): Array<string>; static read_file_txt(file: string): string; static read_file_xlsx(file: string): XLSX.WorkBook; static read_file_buffer(file: string): Buffer; static write_file_xlsx(writePath: string, content: XLSX.WorkBook): void; static write_file_txt(writePath: string, content: string): void; static read_file_json(file: string): any; static write_file_json(file: string, json_object: any): void; static write_my_file<T, P extends IOable>(source_file: string, job_parameter: P, workbook: T, do_not_write_file: boolean, doWriting?: (filename: string, data: T) => void): void; }