app.use(utils.store(this.name, {cwd: path.resolve(__dirname, '../../.data')}));
180144
function Data(options) {
  if (!(this instanceof Data)) {
    return new Data(options);
  }
  var opts = utils.merge({cwd: path.resolve(__dirname, '../../.data')}, options);
  Base.call(this, null, opts);
  this.define('store', utils.store('npm-api', this.options));
}
857978
function resolvePath(metalsmith) {
    var globStart = false;                            // Indicator, if globbing pattern was found yet
    var cwd = metalsmith.directory();                 // Get Metalsmith working directory
    var subPath = [];
    var pattern = [];
    var directory = dir.split('/');
    directory.forEach(function parsePathElems(elem) {
      if (globStart || elem.search(/[^a-z0-9\.\-_]/gi) >= 0) {   // Search in current path segment for glob patterns
        globStart = true;                 // If true, set globStart to true
        return pattern.push(elem);        // add to pattern now and in future automatically
      }
      return subPath.push(elem);
    });

    // Now check if calculated path is existing (absolute vs relative position to Metalsmith CWD)
    var localPath = path.resolve(cwd, subPath.join('/'));   // Assume path is relative to CWD, e.g. ./src/*.json
    if (!fs.existsSync(path.resolve(cwd, localPath))) {
      localPath = path.relative(cwd, subPath.join('/'));    // Assumption false, it was absolute, e.g. ./test/fixtures/...
    }

    return path.resolve(cwd, localPath, pattern.join('/')); // return correct path
  }
744929
function Json(filepath) {
  this.filepath = filepath;
  this.dirname = undefined;
  this.json = undefined;
  this.realpath = undefined;
}
165010
function (options) {
  if (typeof options === 'string') {
    options = {
      path: options
    };
  }

  options = ul.merge(options, {
    path: './'
  });

  options.path = path.resolve(options.path);

  this.options = options;
  this.cwd = options.path;
}
1187536
function (cmd, cwd) {
      return execute(cmd, cwd ? path.resolve(target, cwd) : target)
    }
428904
function _paths(cwd, dataPath) {
  const paths = Utils.assignWith({}, {
    root: '.',
    data: dataPath,
    cache: join(dataPath, 'cache'),
    uploads: join(dataPath, 'uploads'),
    www: './www',
    modules: './node_modules',
  }, (_, srcPath) => resolve(cwd, srcPath));

  // Ensure paths exist
  Utils.mkdirp(paths.cache);
  Utils.mkdirp(paths.uploads);
  Utils.mkdirp(paths.www);

  return paths;
}
930681
function(){
        var path = $options.path;

        $fs.exists("fis-conf.js", function(res){
            if(res == true){
                $fs.exists(path, function(res){
                    if(res == true){
                        console.log("[Error-1001] This path:"+path+" exists");
                    }else{
                        snippets.fn.appFolder(path);
                    }
                });
            }else{
                console.log("[Error-1002] In this folder that can't build widget or page folders");
            }
        });
    }
1055824
function onDirectory() {
      var this_SendStream = this;
      if (!/\/$/.test(reqUrl.pathname)) {
        // No trailing slash? Redirect to add one
        res.writeHead(301, {
          'Location': reqUrl.pathname + '/' + (reqUrl.search || '')
        });
        res.end();
        deferred.resolve(true);
        return;
      }

      var indexPath = path.normalize(path.join(
        self.$root, unescape(this.path), 'index.html'));

      fs.exists(indexPath, function(exists) {
        if (exists) {
          // index.html exists, just serve that. This is the same as
          // the below call except without onDirectory and without
          // .index(false)
          send(req, suffix, {root: self.$root})
            .on('error', onError)
            .on('stream', onStream)
            .pipe(res);
          deferred.resolve(true);
        } else {
          // Either serve up 404, or the directory auto-index
          if (!self.$dirIndex) {
            deferred.resolve(null);
          } else {
            deferred.resolve(
              self.$autoindex_p(req, res, this_SendStream.path, self.$blacklist)
            );
          }
        }
      });
    }
987054
function getDirectoryTree(dir) {
    const items = [];
    return new Promise(function(resolve) {
        fs.walk(dir)
        .on('data', function (item) {
            items.push(item.path);
        })
        .on('end', function () {
            resolve(items);
        });
    });
}
1004692
function(dirname) {
  var result;

  if (!fs.test('-d', dirname))  { return result; }

  result = {};
  _.each(sg.fs.ls(dirname), (name_) => {
    const name      = path.basename(name_, '.js');
    const filename  = path.join(dirname, name);
    if (!fs.test('-f', `${filename}.js`)) { return; }   // skip
    if (name.startsWith('helper'))        { return; }   // skip helper(s).js

    result[name] = result[name] || {};
    _.extend(result[name], libRa.middlewareify(safeRequire(filename)));
  });

  return result;
}
502312
function resolvePath (moduleName, relativePath)
{
  if (! moduleName) {
    return null;
  }

  if (! relativePath) {
    return null;
  }

  const mainPath = require.resolve(moduleName);
  if (! mainPath) {
    return null;
  }

  const rootLocations = [];
  const dirs = mainPath.split(path.sep);
  let lastSegment = dirs.pop();
  while (lastSegment) {
    const location = dirs.concat(['package.json']).join(path.sep);
    rootLocations.push(location);
    lastSegment = dirs.pop();
  }

  for(const location of rootLocations) {
    if (fs.existsSync(location)) {
      const cli = path.resolve(path.dirname(location), relativePath);
      if (fs.existsSync(cli)) {
        return cli;
      }
    }
  }

  return null;
}
737197
public void makeDir(String dir, String data) {

        try {

            boolean deafult_path_exist = store.exists(dir);
            if (!deafult_path_exist) {
                LOGGER.info("create: " + dir);
                this.writePersistentUrl(dir, data);
            } else {
            }

        } catch (KeeperException e) {

            LOGGER.error("cannot create path: " + dir, e);

        } catch (Exception e) {

            LOGGER.error("cannot create path: " + dir, e);
        }
    }
896460
function mkdirs(dir) {
  return new Promise((resolve, reject) => {
    FS.ensureDir(dir, err => {
      err ? reject(err) : resolve(dir);
    })
  });
}
79190
static File resolveDirectory(String[] args) {
    return Optional.of(resolveArgument(args)).map(File::new).filter(File::isDirectory)
      .orElseThrow(() -> newIllegalArgumentException("Argument [%s] is not a valid directory", args[0]));
  }
1187783
function(dir, prefix) {
    if (fs.existsSync(dir)) {
      let dirname = path.relative(this.project.root, dir);
      let globs = this.parentRegistry.extensionsForType('js').map((extension) => `**/*.${extension}`);

      return walkSync(dir, { directories: false, globs }).map(file => {
        let module = prefix + '/' + file.replace(EXT_RE, '.js');
        this.fileLookup[module] = path.join(dirname, file);
        return module;
      });
    } else {
      return [];
    }
  }
936807
function resolveAppBuild(appTsConfigPath) {
  const outDir = getAppBuildFolder(appTsConfigPath);
  const buildPath = path.join(path.dirname(appTsConfigPath), outDir);
  return buildPath;
}
1172751
function getAppDir() {
    var fileRepo = args._[1] ? path.resolve(args._[1]) : undefined;
    return fileRepo && fs.existsSync(fileRepo) ? fileRepo : 0;
}