Codota Logo
ApplicationFile.isDirectory
Code IndexAdd Codota to your IDE (free)

How to use
isDirectory
method
in
com.yahoo.config.application.api.ApplicationFile

Best Java code snippets using com.yahoo.config.application.api.ApplicationFile.isDirectory (Showing top 2 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew LinkedList()
  • Codota IconCollections.emptyList()
  • Codota Iconnew ArrayList()
  • Smart code suggestions by Codota
}
origin: com.yahoo.vespa/config-model-api

/**
 * List the files in this directory, optionally list files for subdirectories recursively as well.
 *
 * @param recurse Set to true if all files in the directory tree should be returned.
 * @return a list of files in this directory.
 */
public List<ApplicationFile> listFiles(boolean recurse) {
  List<ApplicationFile> ret = new ArrayList<>();
  List<ApplicationFile> files = listFiles();
  ret.addAll(files);
  if (recurse) {
    for (ApplicationFile file : files) {
      if (file.isDirectory()) {
        ret.addAll(file.listFiles(recurse));
      }
    }
  }
  return ret;
}
origin: com.yahoo.vespa/config-model

Map<String, ExpressionFunction> readExpressions() {
  Map<String, ExpressionFunction> expressions = new HashMap<>();
  ApplicationFile expressionPath = application.getFile(modelFiles.expressionsPath());
  if ( ! expressionPath.exists() || ! expressionPath.isDirectory()) return Collections.emptyMap();
  for (ApplicationFile expressionFile : expressionPath.listFiles()) {
    try (BufferedReader reader = new BufferedReader(expressionFile.createReader())){
      String name = expressionFile.getPath().getName();
      expressions.put(name, readExpression(name, reader));
    }
    catch (IOException e) {
      throw new UncheckedIOException("Failed reading " + expressionFile.getPath(), e);
    }
    catch (ParseException e) {
      throw new IllegalStateException("Invalid stored expression in " + expressionFile, e);
    }
  }
  return expressions;
}
com.yahoo.config.application.apiApplicationFileisDirectory

Javadoc

Check whether or not this file is a directory.

Popular methods of ApplicationFile

  • createReader
    Create a Reader for the contents of this file.
  • getPath
    Get the path that this file represents.
  • listFiles
    List the files in this directory, optionally list files for subdirectories recursively as well.
  • appendFile
    Appends the given string to this text file.
  • exists
    Test whether or not this file exists.
  • writeFile
    Write the contents from this reader to this file. Any existing content will be overwritten!

Popular in Java

  • Making http post requests using okhttp
  • getExternalFilesDir (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • JList (javax.swing)
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now