"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.readRootDirectorySync=readRootDirectorySync;exports.default=void 0;var _fs=_interopRequireDefault(require("fs"));
var _path2=_interopRequireDefault(require("path"));

function readRootDirectorySync(dir,params){var _params$cwd;
let names=[];
const parentPath=_path2.default.resolve((_params$cwd=params===null||params===void 0?void 0:params.cwd)!==null&&_params$cwd!==void 0?_params$cwd:process.cwd(),dir!==null&&dir!==void 0?dir:"");

if(_fs.default.existsSync(parentPath)){var _params$dotFilter;
let paths=_fs.default.readdirSync(parentPath);

if((_params$dotFilter=params===null||params===void 0?void 0:params.dotFilter)!==null&&_params$dotFilter!==void 0?_params$dotFilter:true){
paths=paths.filter(_path=>_path.charAt(0)!==".");
}
paths.forEach(_path=>{var _params$fullPath;
if((_params$fullPath=params===null||params===void 0?void 0:params.fullPath)!==null&&_params$fullPath!==void 0?_params$fullPath:false){
return names.push(_path2.default.resolve(parentPath,_path));
}
return names.push(_path);
});
}
return names;
}var _default=

readRootDirectorySync;exports.default=_default;