@mdfriday/foundry
Version:
The core engine of MDFriday. Convert Markdown and shortcodes into fully themed static sites – Hugo-style, powered by TypeScript.
48 lines • 1.27 kB
TypeScript
import { FileInfo as IFileInfo, FileMetaInfo, File } from '../type';
import { FileMeta } from './filemeta';
/**
* FileInfo represents file information with metadata
* TypeScript version of Go's FileInfo struct
* Implements FileMetaInfo interface
*/
export declare class FileInfo implements FileMetaInfo {
private readonly fileInfo;
private _fileMeta;
constructor(fileInfo: IFileInfo, fileMeta: FileMeta);
/**
* Meta returns the FileMeta
*/
meta(): FileMeta;
/**
* Type returns the file mode
*/
type(): number;
/**
* Info returns the underlying FileInfo
*/
info(): IFileInfo;
/**
* Set the FileMeta
*/
setMeta(meta: FileMeta): void;
name(): string;
size(): number;
mode(): number;
modTime(): Date;
isDir(): boolean;
sys(): any;
fileName(): string;
relativeFilename(): string;
component(): string;
root(): string;
open(): Promise<File>;
}
/**
* Creates a new FileInfo instance
*/
export declare function newFileInfo(fi: IFileInfo, filename: string): FileInfo;
/**
* Creates a new FileInfo instance with FileMeta
*/
export declare function newFileInfoWithMeta(fi: IFileInfo, meta: FileMeta): FileInfo;
//# sourceMappingURL=fileinfo.d.ts.map