Examples of DirFilter


Examples of com.fogas.koll3ctions.core.filter.DirFilter

  public boolean isKindle(File f) {
    if (!f.exists()) {
      return false;
    }
    File[] files = f.listFiles(new DirFilter());
    int found = 0;
    for (int i = 0; i < files.length; i++) {
      if (folders.contains(files[i].getName().toLowerCase())) {
        found++;
      }
View Full Code Here

Examples of com.lowagie.toolbox.arguments.filters.DirFilter

     */
    public PhotoAlbum() {
        menuoptions = MENU_EXECUTE | MENU_EXECUTE_SHOW;
        arguments.add(new FileArgument(this, "srcdir",
                "The directory containing the image files", false,
                                       new DirFilter()));
        arguments.add(new FileArgument(this, "destfile",
                "The file to which the converted TIFF has to be written", true,
                                       new PdfFilter()));
    }
View Full Code Here

Examples of com.lowagie.toolbox.arguments.filters.DirFilter

     */
    public PhotoAlbum() {
        menuoptions = MENU_EXECUTE | MENU_EXECUTE_SHOW;
        arguments.add(new FileArgument(this, "srcdir",
                "The directory containing the image files", false,
                                       new DirFilter()));
        arguments.add(new FileArgument(this, "destfile",
                "The file to which the converted TIFF has to be written", true,
                                       new PdfFilter()));
    }
View Full Code Here

Examples of com.lowagie.tools.arguments.filters.DirFilter

  /**
   * Constructs a PhotoAlbum object.
   */
  public PhotoAlbum() {
    menuoptions = MENU_EXECUTE | MENU_EXECUTE_SHOW;
    arguments.add(new FileArgument(this, "srcdir", "The directory containing the image files", false, new DirFilter()));
    arguments.add(new FileArgument(this, "destfile", "The file to which the converted TIFF has to be written", true, new PdfFilter()));
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.util.FSUtils.DirFilter

   * @param fs
   * @param hbaseRootDir
   * @throws IOException
   */
  private void rewrite(final Path hbaseRootDir) throws IOException {
    FileStatus [] tableDirs = fs.listStatus(hbaseRootDir, new DirFilter(fs));
    for (int i = 0; i < tableDirs.length; i++) {
      // Inside a table, there are compaction.dir directories to skip.
      // Otherwise, all else should be regions.  Then in each region, should
      // only be family directories.  Under each of these, should be a mapfile
      // and info directory and in these only one file.
      Path d = tableDirs[i].getPath();
      if (d.getName().equals(HConstants.HREGION_LOGDIR_NAME)) continue;
      FileStatus [] regionDirs = fs.listStatus(d, new DirFilter(fs));
      for (int j = 0; j < regionDirs.length; j++) {
        Path dd = regionDirs[j].getPath();
        if (dd.equals(HConstants.HREGION_COMPACTIONDIR_NAME)) continue;
        // Else its a region name.  Now look in region for families.
        FileStatus [] familyDirs = fs.listStatus(dd, new DirFilter(fs));
        for (int k = 0; k < familyDirs.length; k++) {
          Path family = familyDirs[k].getPath();
          Path mfdir = new Path(family, "mapfiles");
          FileStatus [] mfs = fs.listStatus(mfdir);
          if (mfs.length > 1) {
View Full Code Here

Examples of org.apache.hadoop.hbase.util.FSUtils.DirFilter

  private static void gathermapfiles(final HBaseConfiguration conf,
      final FileSystem fs, final FSDataOutputStream out)
  throws IOException {
    // Presumes any directory under hbase.rootdir is a table.
    FileStatus [] tableDirs =
      fs.listStatus(FSUtils.getRootDir(conf), new DirFilter(fs));
    for (int i = 0; i < tableDirs.length; i++) {
      // Inside a table, there are compaction.dir directories to skip.
      // Otherwise, all else should be regions.  Then in each region, should
      // only be family directories.  Under each of these, should be a mapfile
      // and info directory and in these only one file.
      Path d = tableDirs[i].getPath();
      if (d.getName().equals(HConstants.HREGION_LOGDIR_NAME)) continue;
      FileStatus [] regionDirs = fs.listStatus(d, new DirFilter(fs));
      for (int j = 0; j < regionDirs.length; j++) {
        Path dd = regionDirs[j].getPath();
        if (dd.equals(HConstants.HREGION_COMPACTIONDIR_NAME)) continue;
        // Else its a region name.  Now look in region for families.
        FileStatus [] familyDirs = fs.listStatus(dd, new DirFilter(fs));
        for (int k = 0; k < familyDirs.length; k++) {
          Path family = familyDirs[k].getPath();
          FileStatus [] infoAndMapfile = fs.listStatus(family);
          // Assert that only info and mapfile in family dir.
          if (infoAndMapfile.length != 2) {
View Full Code Here

Examples of org.apache.hadoop.hbase.util.FSUtils.DirFilter

  private static void gathermapfiles(final HBaseConfiguration conf,
      final FileSystem fs, final FSDataOutputStream out)
  throws IOException {
    // Presumes any directory under hbase.rootdir is a table.
    FileStatus [] tableDirs =
      fs.listStatus(FSUtils.getRootDir(conf), new DirFilter(fs));
    for (int i = 0; i < tableDirs.length; i++) {
      // Inside a table, there are compaction.dir directories to skip.
      // Otherwise, all else should be regions.  Then in each region, should
      // only be family directories.  Under each of these, should be a mapfile
      // and info directory and in these only one file.
      Path d = tableDirs[i].getPath();
      if (d.getName().equals(HConstants.HREGION_LOGDIR_NAME)) {
        continue;
      }
      FileStatus [] regionDirs = fs.listStatus(d, new DirFilter(fs));
      for (int j = 0; j < regionDirs.length; j++) {
        Path dd = regionDirs[j].getPath();
        if (dd.getName().equals(HConstants.HREGION_COMPACTIONDIR_NAME)) {
          continue;
        }
        // Else its a region name.  Now look in region for families.
        FileStatus [] familyDirs = fs.listStatus(dd, new DirFilter(fs));
        for (int k = 0; k < familyDirs.length; k++) {
          Path family = familyDirs[k].getPath();
          FileStatus [] infoAndMapfile = fs.listStatus(family);
          // Assert that only info and mapfile in family dir.
          if (infoAndMapfile.length != 2) {
View Full Code Here

Examples of org.apache.hadoop.hbase.util.FSUtils.DirFilter

   * @param fs
   * @param hbaseRootDir
   * @throws IOException
   */
  private void rewrite(final Path hbaseRootDir) throws IOException {
    FileStatus [] tableDirs = fs.listStatus(hbaseRootDir, new DirFilter(fs));
    for (int i = 0; i < tableDirs.length; i++) {
      // Inside a table, there are compaction.dir directories to skip.
      // Otherwise, all else should be regions.  Then in each region, should
      // only be family directories.  Under each of these, should be a mapfile
      // and info directory and in these only one file.
      Path d = tableDirs[i].getPath();
      if (d.getName().equals(HConstants.HREGION_LOGDIR_NAME)) {
        continue;
      }
      FileStatus [] regionDirs = fs.listStatus(d, new DirFilter(fs));
      for (int j = 0; j < regionDirs.length; j++) {
        Path dd = regionDirs[j].getPath();
        if (dd.getName().equals(HConstants.HREGION_COMPACTIONDIR_NAME)) {
          continue;
        }
        // Else its a region name.  Now look in region for families.
        FileStatus [] familyDirs = fs.listStatus(dd, new DirFilter(fs));
        for (int k = 0; k < familyDirs.length; k++) {
          Path family = familyDirs[k].getPath();
          Path mfdir = new Path(family, "mapfiles");
          FileStatus [] mfs = fs.listStatus(mfdir);
          if (mfs.length > 1) {
View Full Code Here

Examples of org.myphotodiary.util.DirFilter

  protected int appendSubDirectories(List<JsonDirData> allDirectories, List<Directory> indexedDirectories, File parentDir, int dirIx, String relativePath) {
    System.out.println("Directory: " + dirIx + ", " + relativePath);
    int ix = dirIx;
    if (parentDir.isDirectory()) {
      File[] subDirs = parentDir.listFiles(new DirFilter());
      Arrays.sort(subDirs);
      JsonDirData dirData;
      for (File subDir: subDirs) {
        if (!relativePath.endsWith("/")) {
          relativePath += "/";
View Full Code Here

Examples of org.myphotodiary.util.DirFilter

  protected int appendSubDirectories(List<JsonDirData> allDirectories, List<Directory> indexedDirectories, File parentDir, int dirIx, String relativePath) {
    System.out.println("Directory: " + dirIx + ", " + relativePath);
    int ix = dirIx;
    if (parentDir.isDirectory()) {
      File[] subDirs = parentDir.listFiles(new DirFilter());
      Arrays.sort(subDirs);
      JsonDirData dirData;
      for (File subDir: subDirs) {
        if (!relativePath.endsWith("/")) {
          relativePath += "/";
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.