Tabnine Logo
FileChangeObserver.listFiles
Code IndexAdd Tabnine to your IDE (free)

How to use
listFiles
method
in
leap.lang.io.FileChangeObserver

Best Java code snippets using leap.lang.io.FileChangeObserver.listFiles (Showing top 4 results out of 315)

origin: org.leapframework/leap-lang

/**
 * Create a new file entry for the specified file.
 *
 * @param parent The parent file entry
 * @param file The file to create an entry for
 * @return A new file entry
 */
private FileInfo createFileEntry(FileInfo parent, File file) {
  FileInfo entry = parent.newChildInstance(file);
  entry.refresh(file);
  File[] files = listFiles(file);
  FileInfo[] children = files.length > 0 ? new FileInfo[files.length] : FileInfo.EMPTY_FILE_INFOS;
  for (int i = 0; i < files.length; i++) {
    children[i] = createFileEntry(entry, files[i]);
  }
  entry.setChildren(children);
  return entry;
}
origin: org.leapframework/leap-lang

/**
 * Initialize the observer.
 *
 * @throws Exception if an error occurs
 */
protected synchronized void initialize() {
  rootEntry.refresh(rootEntry.getFile());
  File[] files = listFiles(rootEntry.getFile());
  FileInfo[] children = files.length > 0 ? new FileInfo[files.length] : FileInfo.EMPTY_FILE_INFOS;
  for (int i = 0; i < files.length; i++) {
    children[i] = createFileEntry(rootEntry, files[i]);
  }
  rootEntry.setChildren(children);
  _initialized = true;
}
origin: org.leapframework/leap-lang

  checkAndNotify(rootEntry, rootEntry.getChildren(), listFiles(rootFile));
} else if (rootEntry.isExists()) {
  checkAndNotify(rootEntry, rootEntry.getChildren(), Files.EMPTY_FILE_ARRAY);
origin: org.leapframework/leap-lang

checkAndNotify(entry, entry.getChildren(), listFiles(files[c]));
current[c] = entry;
c++;
leap.lang.ioFileChangeObserverlistFiles

Javadoc

List the contents of a directory

Popular methods of FileChangeObserver

  • <init>
    Construct an observer for the specified directory, file filter and file comparator.
  • addListener
    Add a file system listener.
  • checkAndNotify
    Compare two file lists for files which have been created, modified or deleted.
  • createFileEntry
    Create a new file entry for the specified file.
  • destroy
    Final processing.
  • doCreate
    Fire directory/file created events to the registered listeners.
  • doDelete
    Fire directory/file delete events to the registered listeners.
  • doMatch
    Fire directory/file change events to the registered listeners.
  • getDirectory
    Return the directory being observed.
  • initialize
    Initialize the observer.

Popular in Java

  • Running tasks concurrently on multiple threads
  • putExtra (Intent)
  • compareTo (BigDecimal)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • 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