Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function (fs) {
if (path === '') {
// no path provided, call success with root file system
success(createEntryFromNative(fs.root));
} else {
// otherwise attempt to resolve as file
fs.root.getFile(
path,
options,
function (entry) {
success(createEntryFromNative(entry));
},
function (fileError) {
// file not found, attempt to resolve as directory
fs.root.getDirectory(
path,
options,
function (entry) {
success(createEntryFromNative(entry));
},
function (entry) {
success(createEntryFromNative(entry));
},
function (dirError) {