File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -568,41 +568,6 @@ async function findFiles({
568568 ] ;
569569}
570570
571-
572- /**
573- * Checks whether a file exists at the given location
574- * @param {string } resolvedPath A path from the CWD
575- * @throws {Error } As thrown by `fs.statSync` or `fs.isFile`.
576- * @returns {boolean } `true` if a file exists
577- */
578- function fileExists ( resolvedPath ) {
579- try {
580- return fs . statSync ( resolvedPath ) . isFile ( ) ;
581- } catch ( error ) {
582- if ( error && ( error . code === "ENOENT" || error . code === "ENOTDIR" ) ) {
583- return false ;
584- }
585- throw error ;
586- }
587- }
588-
589- /**
590- * Checks whether a directory exists at the given location
591- * @param {string } resolvedPath A path from the CWD
592- * @throws {Error } As thrown by `fs.statSync` or `fs.isDirectory`.
593- * @returns {boolean } `true` if a directory exists
594- */
595- function directoryExists ( resolvedPath ) {
596- try {
597- return fs . statSync ( resolvedPath ) . isDirectory ( ) ;
598- } catch ( error ) {
599- if ( error && ( error . code === "ENOENT" || error . code === "ENOTDIR" ) ) {
600- return false ;
601- }
602- throw error ;
603- }
604- }
605-
606571//-----------------------------------------------------------------------------
607572// Results-related Helpers
608573//-----------------------------------------------------------------------------
@@ -924,8 +889,6 @@ function getCacheFile(cacheFile, cwd) {
924889
925890module . exports = {
926891 isGlobPattern,
927- directoryExists,
928- fileExists,
929892 findFiles,
930893
931894 isNonEmptyString,
You can’t perform that action at this time.
0 commit comments