Process included directory.
@param name path of the directory relative to the directory of
the FileSet.
@param file directory as File.
@param fast whether to perform fast scans.
499192
private void accountForIncludedDir(String name, File file, boolean fast) {
        processIncluded(name, file, dirsIncluded, dirsExcluded, dirsDeselected);
        if (fast && couldHoldIncluded(name) && !contentsExcluded(name)) {
            scandir(file, name + File.separator, fast);
        }
    }
329101
public void mkdir(String folderName) {
    try {
      getDFS().mkdirs(new Path(this.path, folderName));
    } catch (IOException ioe) {
      ioe.printStackTrace();
    }
    doRefresh();
  }
1371658
function processFile(fPath, context) {
    if (context.included[fPath])
        return;
    context.included[fPath] = true;

    var relPath = path.relative(context.root, fPath);
    context.write("/* " + relPath + ": begin [depth " + context.includeStack.length + "] */\n", "utf-8");
    context.includeStack.push(relPath);

    var parsedFile = context.filetype.parse(fPath);
    parsedFile.forEach(function(item) {
        if (Buffer.isBuffer(item)) {
            context.write(item);
            return;
        }
        try {
            context.filetype.process(fPath, item, context);
        } catch(ex) {
            console.error("------------");
            console.error(JSON.stringify(item));
            throw ex;
        }
    });

    context.includeStack.pop();
    context.write("/* " + relPath + ": end */\n", "utf-8");

    return parsedFile;
}
19102
function includedFiles(name){
    let includes=this.getIncludes(this.getFile(name));
    let ret=includes.map(include => {
        let ret = {
            absolute:path.join(name,"../",include.relPath),
            relative:include.relPath,
            match:include.match
        }
        return ret;
    })
    return ret;
}
1164071
def _check_and_handle_includes(self, from_file):
        
        logger.debug("Check/handle includes from %s", from_file)
        try:
            paths = self._parser.get("INCLUDE", "paths")
        except (config_parser.NoSectionError,
                config_parser.NoOptionError) as exc:
            logger.debug("_check_and_handle_includes: EXCEPTION: %s", exc)
            return
        paths_lines = [p.strip() for p in paths.split("\n")]
        logger.debug("paths = %s (wanted just once; CLEARING)", paths_lines)
        self._parser.remove_option("INCLUDE", "paths")
        for f in paths_lines:
            abspath = (f if os.path.isabs(f) else
                       os.path.abspath(
                           os.path.join(os.path.dirname(from_file), f)))
            use_path = os.path.normpath(abspath)
            if use_path in self._parsed_files:
                raise RecursionInConfigFile("In %s: %s already read",
                                            from_file, use_path)
            self._parsed_files.append(use_path)
            self._handle_rc_file(use_path)
1167531
def include_file(filename):
        """"""
        if os.path.isfile(filename):
            with open(filename) as handle:
                return safe_load(handle)
        raise RuntimeError("Include file %s doesn't exist!" % filename)
385597
static function includeFile($paths, $file_name) {
        $path_arr = explode(';', $paths);
        foreach ($path_arr as $p) {
            $file = $p . '/' . $file_name;
            if (file_exists($file)){
                return include $file;
            }
        }
        throw new FileNotExistException("unable to include the file $file_name");
    }
1359355
public void parse(final String filename, final File dir) {
        filePath = stripFragment(filename);
        dirPath = dir;
        try {
            final File f = new File(dir, filePath);
            reader.setErrorHandler(new DITAOTXMLErrorHandler(f.getAbsolutePath(), logger));
            logger.info("Processing " + f.getAbsolutePath());
            reader.parse(f.toURI().toString());
        } catch (final RuntimeException e) {
            throw e;
        } catch (final Exception e) {
            throw new RuntimeException("Failed to parse " + filename + ": " + e.getMessage(), e);
        }
    }
1147770
public static void checkFileExists(final File file, final String name)
    {
        if (!file.exists())
        {
            final String msg = "missing file for " + name + " : " + file.getAbsolutePath();
            throw new IllegalStateException(msg);
        }
    }
571488
@Nullable
  private DirectoryEntry lookUp(
      File dir, Iterable<Name> names, Set<? super LinkOption> options, int linkDepth)
      throws IOException {
    Iterator<Name> nameIterator = names.iterator();
    Name name = nameIterator.next();
    while (nameIterator.hasNext()) {
      Directory directory = toDirectory(dir);
      if (directory == null) {
        return null;
      }

      DirectoryEntry entry = directory.get(name);
      if (entry == null) {
        return null;
      }

      File file = entry.file();
      if (file.isSymbolicLink()) {
        DirectoryEntry linkResult = followSymbolicLink(dir, (SymbolicLink) file, linkDepth);

        if (linkResult == null) {
          return null;
        }

        dir = linkResult.fileOrNull();
      } else {
        dir = file;
      }

      name = nameIterator.next();
    }

    return lookUpLast(dir, name, options, linkDepth);
  }
888374
private void handleDirectory(final Predicate<String> filter, final File rootDir, final List<String> discoveredFiles)
    {
        try
        {
            new DirectoryWalker<String>()
            {
                private Path startDir;

                public void walk() throws IOException
                {
                    this.startDir = rootDir.toPath();
                    this.walk(rootDir, discoveredFiles);
                }

                @Override
                protected void handleFile(File file, int depth, Collection<String> discoveredFiles) throws IOException
                {
                    String newPath = startDir.relativize(file.toPath()).toString();
                    if (filter.accept(newPath))
                        discoveredFiles.add(newPath);
                }

            }.walk();
        }
        catch (IOException ex)
        {
            LOG.log(Level.SEVERE, "Error reading Furnace addon directory", ex);
        }
    }
428131
def include_file(_parent, indent)
      return unless accept :include

      # Process data
      name = accept :line_feed || ''
      name.strip!

      # Check if there is any string after the include input
      Logger.error :parse, @code, @i, @j, :include_end if name.empty?

      # Get the complete file path based on the current file being compiled
      include_path = File.expand_path name, File.dirname(@file[-1][0])

      # Try to see if it has any existing extension, otherwise add .op
      include_path += Settings::FILE_EXTENSION if File.extname(name).empty?

      # Throw an error if the file doesn't exist
      unless Dir[include_path].any?
        Logger.error :parse, @code, @i, @j, :include, name
      end

      # include entire directory tree
      Dir[include_path].each do |file|
        # Skip current file when including from same directory
        next if file == @file[-1][0]

        @file << [include_path, indent]

        # Throw an error if the file doesn't exist
        if File.directory? file
          Logger.error :parse, @code, @i, @j, :include_dir, file
        end

        # Throw an error if the file doesn't exist
        unless File.file? file
          Logger.error :parse, @code, @i, @j, :include, file
        end

        # Indent all lines and prepare them for the parser
        lines = indent_lines File.read(file), ' ' * indent
        lines << ' '

        # Indent all the output lines with the current indentation
        @code.insert @i + 1, *lines.lines
      end

      true
    end
518252
@Override
  public void loadPath(File path, FileFilter filt) {
    FilePathProcessor.processPath(path, filt, this);
  }
292468
function File(filepath, data, importer) {
  this.file = filepath;
  this.data = data;
  this.importer = importer;
  this.includedFiles = [];
  this._cb = [];
  _.cacheFile(filepath);
}
800601
public File getFile(String name) {
		if (name == null) {
			throw new NullPointerException("name must not be null");
		}

		Future<Path> future = cacheCopyTasks.get(name);
		if (future == null) {
			throw new IllegalArgumentException("File with name '" + name + "' is not available." +
					" Did you forget to register the file?");
		}

		try {
			final Path path = future.get();
			URI tmp = path.makeQualified(path.getFileSystem()).toUri();
			return new File(tmp);
		}
		catch (ExecutionException e) {
			throw new RuntimeException("An error occurred while copying the file.", e.getCause());
		}
		catch (Exception e) {
			throw new RuntimeException("Error while getting the file registered under '" + name +
					"' from the distributed cache", e);
		}
	}
1183897
function(name, root) {
    this.name = name || null;
    if (root) {
        this.root = new DirectoryEntry(root.name, root.fullPath, this);
    }
}
676821
protected String processFileName(String name) {

        int pos = name.lastIndexOf("/");
        if (pos >= 0) {
            name = name.substring(pos + 1);
        }
        pos = name.lastIndexOf("\\");
        if (pos >= 0) {
            name = name.substring(pos + 1);
        }
        return name;
    }