Contains the path to the input file (or directory) to be processed
2531
public WindupConfiguration addInputPath(Path inputPath)
    {
        Set<Path> inputPaths = getOptionValue(InputPathOption.NAME);
        if (inputPaths == null)
        {
            inputPaths = new LinkedHashSet<>();
            setOptionValue(InputPathOption.NAME, inputPaths);
        }
        inputPaths.add(inputPath);
        return this;
    }
740971
def _find_file(filename):
    
    import os
    if os.path.exists(filename):
        path = filename
    else:
        path = os.path.dirname(__file__)
        path = os.path.join(path, 'data', filename)

    if not os.path.exists(path):
        raise ValueError("cannot locate file '%s'" %filename)

    return path
1172626
def _GetRelPath(self, filename):
		""""""
		assert filename.startswith(self.subdir), (filename, self.subdir)
		return filename[len(self.subdir):].lstrip(r"\/")
1256542
def get_input_files(dirname, *ext):
    
    filelist = [f for f in os.listdir(dirname) if
                os.path.splitext(f)[-1] in ext]
    return [os.path.join(dirname, f) for f in filelist]
902824
def process_path(label, pth):
   ""
   
   if pth is None:
      sys.exit("no %s path given" % label)
      
   if pth.startswith("/"):
      pass
   elif pth[0] in (".", "~"):
      pth = os.path.realpath(pth)
   else:
      pth = os.getcwd() + os.sep + pth
   
   if not os.path.exists(pth):
      sys.exit("%s path %s does not exist" % (label, pth))

   return pth
512068
def _ProcessFileSource(self, source):
    """"""

    if source.path_type != rdf_paths.PathSpec.PathType.OS:
      raise ValueError("Only supported path type is OS.")

    paths = artifact_utils.InterpolateListKbAttributes(
        source.base_source.attributes["paths"], self.knowledge_base,
        self.ignore_interpolation_errors)

    file_finder_action = rdf_file_finder.FileFinderAction.Stat()
    request = rdf_file_finder.FileFinderArgs(
        paths=paths, pathtype=source.path_type, action=file_finder_action)
    action = file_finder.FileFinderOSFromClient

    yield action, request
508518
function findImportedPath(url, prev, includedFilesMap, includedPaths) {
  let candidateFromPaths;

  if(prev !== 'stdin') {
    const prevPath = path.posix.dirname(prev);
    candidateFromPaths = [prevPath, ...includedPaths];
  } else {
    candidateFromPaths = [...includedPaths];
  }

  for(let i = 0; i < candidateFromPaths.length; i++) {
    let candidatePath;
    let candidateFromPath = normalizePath(makeAbsolute(candidateFromPaths[i]));
    if (path.isAbsolute(url)) {
      candidatePath = normalizePath(url);
    } else {
      // Get normalize absolute candidate from path
      candidatePath = path.posix.join(candidateFromPath, url);
    }

    if(includedFilesMap[candidatePath]) {
      return candidatePath;
    } else {
      let urlBasename = path.posix.basename(url);
      let indexOfBasename = url.lastIndexOf(urlBasename);
      let partialUrl = `${url.substring(0, indexOfBasename)}_${urlBasename}`;

      if (path.isAbsolute(partialUrl)) {
        candidatePath = normalizePath(partialUrl);
      } else {
        candidatePath = path.posix.join(candidateFromPath, partialUrl);
      }

      if(includedFilesMap[candidatePath]) {
        return candidatePath;
      }
    }
  }

  return null;
}
83871
def calculate_path(self, remote_relative_path, input_type):
        
        directory, allow_nested_files = self._directory_for_file_type(input_type)
        return self.path_helper.remote_join(directory, remote_relative_path)
1101878
function processFilePath(directory: string, fileName: string) {
      // If we were rejected then we should not continue.
      if (rejected === true) {
        return;
      }
      // We are now waiting on this asynchronous task.
      waiting++;
      // Get the file file path for this file.
      const filePath = path.join(directory, fileName);
      // Get the stats for the file.
      fs.lstat(filePath, (error, stats) => {
        if (error) {
          return reject(error);
        }
        // If this is a directory...
        if (stats.isDirectory()) {
          // ...and it is not an ignored directory...
          if (
            fileName !== 'node_modules' &&
            fileName !== 'flow-typed' &&
            fileName !== '__flowtests__'
          ) {
            // ...then recursively process the directory.
            processDirectory(filePath);
          }
        } else if (stats.isFile()) {
          // Otherwise if this is a JavaScript/JSX file and it is not an ignored
          // JavaScript file...
          const fileIsJsOrJsx = /\.jsx?$/.test(fileName);
          const fileIsIgnored = fileName.endsWith('-flowtest.js');
          if (fileIsJsOrJsx && !fileIsIgnored) {
            // Then process the file path as JavaScript.
            processJavaScriptFilePath(filePath, stats.size);
          }
          // If this is a Flow file then we don't need to check the file pragma
          // and can add the file to our paths immediately.
          if (fileName.endsWith('.flow')) {
            filePaths.push(filePath);
          }
        }
        // We are done with this async task
        done();
      });
    }
1340948
def match_path(entry, opts):
    """"""
    if entry.name in ALWAYS_OMIT:
        return False
    # TODO: currently we use fnmatch syntax and match against names.
    # We also might allow glob syntax and match against the whole relative path instead
    # path = entry.get_rel_path()
    path = entry.name
    ok = True
    match = opts.get("match")
    exclude = opts.get("exclude")
    if entry.is_file() and match:
        assert type(match) is list
        ok = False
        for pat in match:
            if fnmatch.fnmatch(path, pat):
                ok = True
                break
    if ok and exclude:
        assert type(exclude) is list
        for pat in exclude:
            if fnmatch.fnmatch(path, pat):
                ok = False
                break
    # write("match", ok, entry)
    return ok
892463
def relpath(self, path, start=None):
        """"""
        if not path:
            raise ValueError("no path specified")
        path = make_string_path(path)
        if start is not None:
            start = make_string_path(start)
        else:
            start = self.filesystem.cwd
        if self.filesystem.alternative_path_separator is not None:
            path = path.replace(self.filesystem.alternative_path_separator,
                                self._os_path.sep)
            start = start.replace(self.filesystem.alternative_path_separator,
                                  self._os_path.sep)
        path = path.replace(self.filesystem.path_separator, self._os_path.sep)
        start = start.replace(
            self.filesystem.path_separator, self._os_path.sep)
        path = self._os_path.relpath(path, start)
        return path.replace(self._os_path.sep, self.filesystem.path_separator)
1033817
def parse_file_path(cls, file_path):
    """"""
    address = None
    pattern = cls.file_regex.match(file_path)
    if pattern:
      address = pattern.group(1)
    return address
639717
function processFile() {
  return (file, callback) => {
    let parsed;
    if (file.meta !== undefined && file.meta.layout !== undefined) {
      const ext = path.extname(file.meta.layout);
      parsed = path.parse(`${trimExtension(file.path)}${ext}`);
    } else {
      parsed = path.parse(file.path);
    }

    const filePath = {
      dir: parsed.dir,
      name: parsed.name,
      ext: parsed.ext,
    };
    const meta = Object.assign({}, file.meta, { filePath });
    async.nextTick(callback, null, Object.assign({}, file, { meta }));
  };
}
1193383
def path_for(self, *args):
        """"""
        if args and args[0].startswith(os.path.sep):
            return os.path.join(*args)
        return os.path.join(self._root_path or os.getcwd(), *args)
276246
def process(input_dir, output_dir, function):
        
        if not os.path.exists(output_dir):
            os.makedirs(output_dir)
        logger = log.get_global_console_logger()
        logger.info("Processing files in {}.".format(input_dir))
        input_file_names = os.listdir(input_dir)
        for input_file_name in input_file_names:
            logger.info("Processing {}.".format(input_file_name))
            input_file = os.path.join(input_dir, input_file_name)
            with codecs.open(input_file, "r", encoding="UTF-8") as f:
                input_string = f.read()
            output_string = function(input_string)
            output_file = os.path.join(output_dir, input_file_name)
            with codecs.open(output_file, "w", encoding="UTF-8") as f:
                f.write(output_string)
        logger.info("Saved processed files to {}.".format(output_dir))
1070309
def filepath(self, filename):
        """"""

        return os.path.join(self.node.full_path, filename)
1081824
def find_file(path_dir, search_str, file_ext):
    ''''''
    import os

    file_path = None

    for file_name in os.listdir(path_dir):
        if (search_str in file_name) and (file_name.endswith(file_ext)):
            file_path = os.path.join(path_dir, file_name)
            break

    if file_path == None:
        raise SystemError('No file found containing string: '
                          '{}.'.format(search_str))

    return file_path