import fs from 'fs-extra' ; import type { MoveOptions , WriteFileOptions } from 'fs-extra' ; export function stat ( path ) { return fs . stat ( path ) ; } export function chmod ( path , mode ) { return fs . chmod ( path , mode ) ; } export async function readFile ( fileName ) ; export async function readFile ( fileName , encoding ) ; export function readFile ( fileName , encoding ? ) { return encoding ? fs . readFile ( fileName , encoding ) : fs . readFile ( fileName ) ; } export function writeFile ( fileName , fileContent ) { return fs . writeFile ( fileName , fileContent ) ; } export function outputFile ( file , data , options ? ) { return fs . outputFile ( file , data , options ?? { } ) ; } export function remove ( dir ) { return fs . remove ( dir ) ; } export function unlink ( path ) { return fs . unlink ( path ) ; } export function exists ( path ) { return fs . pathExists ( path ) ; } export function pathExists ( path ) { return fs . pathExists ( path ) ; } export function move ( src , dest , options ? ) { return fs . move ( src , dest , options ?? { } ) ; } export function readdir ( path ) { return fs . readdir ( path ) ; } export function rm ( path , options ? ) { return fs . rm ( path , options ) ; }