import * as fs from 'fs' ; import quicklyCopyFile = require ( 'quickly-copy-file' ) ; import RSVP = require ( 'rsvp' ) ; import rimraf = require ( 'rimraf' ) ; import mkdirp = require ( 'mkdirp' ) ; export let stat = RSVP . denodeify ( fs . stat , false ) ; let rf = RSVP . denodeify ( fs . readFile , false ) ; export function readFile ( path , options ) ; export function readFile ( path ) ; export function readFile ( path , options ? ) { return rf ( path , options ) ; } export type WriteOptions = { encoding ? : string ; mode ? : number ; flag ? : string ; } ; export let writeFile = RSVP . denodeify ( fs . writeFile , false ) ; export let copy = quicklyCopyFile ; export let remove = RSVP . denodeify ( rimraf , false ) ; export let mkdirs = RSVP . denodeify ( mkdirp , false ) ;