import { KoreFileAdaptor } from "./KoreFileAdaptor" ; export interface KoreFile { readFile ( filePath ) : Promise < string > ; writeFile ( filePath , content ) : Promise < void > ; writeFiles ( files ) : Promise < void > ; deleteFile ( filePath ) : Promise < void > ; } export const createKoreFile = ( { adaptor } ) : KoreFile => { return { deleteFile ( filePath ) { return adaptor . deleteFile ( filePath ) ; } , readFile ( filePath ) { return adaptor . readFile ( filePath ) ; } , writeFile ( filePath , content ) { return adaptor . writeFile ( filePath , content ) ; } , writeFiles ( files ) { return adaptor . writeFiles ( files ) ; } } ; } ;