Answers for "java file search filter"

1

search file java

File dir = new File(directory);

File[] matches = dir.listFiles(new FilenameFilter()
{
  public boolean accept(File dir, String name)
  {
     return name.startsWith("temp") && name.endsWith(".txt");
  }
});
Posted by: Guest on March-27-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language