export interface FileContext { createDirectory ( path ) : Promise < string > ; listFiles ( path ) : Promise < string [ ] > ; stats ( path ) : Promise < Stats > ; writeFile ( path , content ) : Promise < void > ; appendFile ( path , content ) : Promise < void > ; read ( path ) : Promise < string > ; copy ( source , destination ) : Promise < void > ; remove ( path ) : Promise < void > ; exists ( path ) : Promise < boolean > ; watch ( path , callback ) : FileWatcher ; } export interface FileWatcher { close ( ) : void ; } export interface FileStats { type : 'file' ; lastModified : number ; } export interface DirectoryStats { type : 'directory' ; } export interface OtherStats { type : 'other' ; } export type Stats = FileStats | DirectoryStats | OtherStats ;