/**
 * penguins-eggs-v7
 * author: Piero Proietti
 * email: piero.proietti@gmail.com
 * license: MIT
 */ import fs from 'node:fs' ; export default class n8 { param dirPath static isDirectory ( name ) { const path = '/' + name ; const isDirectory = fs . existsSync ( path ) && fs . lstatSync ( path ) . isDirectory ( ) ; return isDirectory ; } static isFile ( name ) { const path = '/' + name ; const isFile = fs . existsSync ( path ) && fs . lstatSync ( path ) . isFile ( ) ; return isFile ; } static isSymbolicLink ( name ) { const path = '/' + name ; const isSymbolicLink = fs . existsSync ( path ) && fs . lstatSync ( path ) . isSymbolicLink ( ) ; return isSymbolicLink ; } static dirent2string ( dir ) { let dirname = '' ; dirname = process . versions . node . split ( '.' ) [ 0 ] === '8' ? JSON . stringify ( dir ) . replace ( '"' , '' ) . replace ( '"' , '' ) : dir . name ; return dirname ; } }