Tabnine Logo
File.isHidden
Code IndexAdd Tabnine to your IDE (free)

How to use
isHidden
method
in
java.io.File

Best Java code snippets using java.io.File.isHidden (Showing top 20 results out of 3,402)

Refine searchRefine arrow

  • File.isDirectory
  • File.getName
origin: gocd/gocd

public static boolean isHidden(File file) {
  return file.isHidden() || file.getName().startsWith(".");
}
origin: nutzam/nutz

  public boolean accept(File f) {
    return !f.isHidden() && f.isDirectory() && !f.getName().startsWith(".");
  }
});
origin: cSploit/android

public ArrayList<File> filter(File[] file_list, boolean onlyDirs, boolean showHidden){
 ArrayList<File> files = new ArrayList<File>();
 if(file_list != null){
  for(File file : file_list){
   if(onlyDirs && !file.isDirectory())
    continue;
   if(!showHidden && file.isHidden())
    continue;
   files.add(file);
  }
  Collections.sort(files);
 }
 return files;
}
origin: nutzam/nutz

  public boolean accept(File f) {
    return !f.isHidden() && f.isDirectory() && !f.getName().startsWith(".");
  }
});
origin: h2oai/h2o-2

private void addFolder(File folder, ArrayList<File> filesInProgress ) {
 if( !folder.canRead() ) return;
 if (folder.isDirectory()) {
  for (File f: folder.listFiles()) {
   if( !f.canRead() ) continue; // Ignore unreadable files
   if( f.isHidden() && !folder.isHidden() )
    continue;             // Do not dive into hidden dirs unless asked
   if (f.isDirectory())
    addFolder(f,filesInProgress);
   else
    filesInProgress.add(f);
  }
 } else {
  filesInProgress.add(folder);
 }
}
origin: nutzam/nutz

  public boolean accept(File f) {
    return !f.isHidden()
        && f.isFile()
        && (null == suffix || f.getName().endsWith(suffix));
  }
});
origin: nutzam/nutz

  public boolean accept(File f) {
    if (f.isDirectory())
      return !f.isHidden() && !f.getName().startsWith(".");
    return f.getName().endsWith(".properties");
  }
});
origin: Dreampie/Resty

 public static List<File> files(File dir) {
  List<File> result = new ArrayList<File>();
  if (dir.exists()) {
   File[] files = dir.listFiles();
   if (files != null && files.length > 0) {
    for (File file : files) {
     if (!file.isHidden()) {
      if (file.isDirectory()) {
       result.addAll(files(new File(file.getAbsolutePath())));
      } else {
       result.add(file);
      }
     }
    }
   }
  }
  return result;
 }
}
origin: azkaban/azkaban

 @Override
 public boolean accept(final File pathname) {
  final String name = pathname.getName();
  return pathname.isFile() && !pathname.isHidden()
    && name.length() > this.suffix.length() && name.endsWith(this.suffix);
 }
}
origin: apache/ignite

  @Override public boolean accept(File f) {
    return !f.isHidden() && (f.isDirectory() || f.isFile() && f.getName().matches(ptrn));
  }
}
origin: apache/flink

if (!file.exists() || file.isHidden() || file.isDirectory() || !file.isFile()) {
  HandlerUtils.sendErrorResponse(
    ctx,
origin: azkaban/azkaban

 @Override
 public boolean accept(final File pathname) {
  if (!pathname.isFile() || pathname.isHidden()) {
   return false;
  }
  final String name = pathname.getName();
  final int length = name.length();
  return this.suffix.length() <= length && this.prefix.length() <= length && name
    .startsWith(this.prefix) && name.endsWith(this.suffix);
 }
}
origin: kiegroup/optaplanner

@Override
public boolean accept(File file) {
  if (file.isDirectory() || file.isHidden()) {
    return false;
  }
  return file.getName().endsWith(extensionWithDot);
}
origin: rapidoid/rapidoid

if (!file.isFile() || file.isDirectory()) {
  return null;
  Log.debug("Loading resource file", "name", name, "file", file);
  this.lastModified = file.lastModified();
  this.hidden = file.isHidden();
  return IO.loadBytes(filename);
origin: azkaban/azkaban

 @Override
 public boolean accept(final File pathname) {
  if (!pathname.isFile() || pathname.isHidden()) {
   return false;
  }
  final String name = pathname.getName();
  final int length = name.length();
  if (this.suffix.length() > length || this.prefix.length() > length) {
   return false;
  }
  return name.startsWith(this.prefix) && name.endsWith(this.suffix);
 }
}
origin: nutzam/nutz

public boolean accept(File f) {
  if (f.isDirectory()) {
    String fnm = f.getName().toLowerCase();
    // 忽略 SVN 和 CVS 文件,还有Git文件
    if (".svn".equals(fnm) || ".cvs".equals(fnm) || ".git".equals(fnm))
      return false;
    return true;
  }
  if (f.isHidden())
    return false;
  return pattern == null || pattern.matcher(f.getName()).find();
}
origin: lets-blade/blade

if (file.isHidden() || !file.exists()) {
  if (resourcesDirectory.isDirectory()) {
    file = new File(resourcesDirectory.getPath() + "/" + cleanURL.substring(1));
    if (file.isHidden() || !file.exists()) {
      throw new NotFoundException(uri);
if (file.isDirectory() && showFileList) {
  sendListing(ctx, uri, getFileMetas(file), cleanURL);
  return;
origin: gocd/gocd

public boolean accept(File file) {
  return !(file.isHidden() || isSerializedObjectFile(file.getName()));
}
origin: nutzam/nutz

  @Override
  public boolean accept(File f) {
    if (f.isDirectory())
      return deep;
    if (f.isHidden())
      return false;
    if (Strings.isEmpty(regex))
      return true;
    return f.getName().matches(regex);
  }
});
origin: lets-blade/blade

if (file.isHidden() || !file.exists()) {
  if (resourcesDirectory.isDirectory()) {
    file = new File(resourcesDirectory.getPath() + "/" + cleanURL.substring(1));
    if (file.isHidden() || !file.exists()) {
      throw new NotFoundException(uri);
if (file.isDirectory() && showFileList) {
  sendListing(ctx, uri, getFileMetas(file), cleanURL);
  return;
java.ioFileisHidden

Javadoc

Returns whether or not this file is a hidden file as defined by the operating system. The notion of "hidden" is system-dependent. For Unix systems a file is considered hidden if its name starts with a ".". For Windows systems there is an explicit flag in the file system for this purpose.

Popular methods of File

  • <init>
    Creates a new File instance by converting the givenfile: URI into an abstract pathname. The exact fo
  • exists
    Tests whether the file or directory denoted by this abstract pathname exists.
  • getAbsolutePath
    Returns the absolute pathname string of this abstract pathname. If this abstract pathname is already
  • getName
    Returns the name of the file or directory denoted by this abstract pathname. This is just the last n
  • isDirectory
  • mkdirs
  • delete
    Deletes the file or directory denoted by this abstract pathname. If this pathname denotes a director
  • listFiles
    Returns an array of abstract pathnames denoting the files and directories in the directory denoted b
  • getParentFile
    Returns the abstract pathname of this abstract pathname's parent, or null if this pathname does not
  • getPath
    Converts this abstract pathname into a pathname string. The resulting string uses the #separator to
  • isFile
  • length
    Returns the length of the file denoted by this abstract pathname. The return value is unspecified if
  • isFile,
  • length,
  • toURI,
  • createTempFile,
  • createNewFile,
  • toPath,
  • mkdir,
  • lastModified,
  • toString,
  • getCanonicalPath

Popular in Java

  • Start an intent from android
  • scheduleAtFixedRate (Timer)
  • runOnUiThread (Activity)
  • getSharedPreferences (Context)
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • BoxLayout (javax.swing)
  • JButton (javax.swing)
  • JCheckBox (javax.swing)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now