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

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

Best Java code snippets using leap.lang.io.FileChangeObserver.createFileEntry (Showing top 3 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

for (FileInfo entry : previous) {
  while (c < files.length && comparator.compare(entry.getFile(), files[c]) > 0) {
    current[c] = createFileEntry(parent, files[c]);
    doCreate(current[c]);
    c++;
  current[c] = createFileEntry(parent, files[c]);
  doCreate(current[c]);
leap.lang.ioFileChangeObservercreateFileEntry

Javadoc

Create a new file entry for the specified file.

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.
  • 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.
  • listFiles
    List the contents of a directory

Popular in Java

  • Reactive rest calls using spring rest template
  • setContentView (Activity)
  • findViewById (Activity)
  • setScale (BigDecimal)
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • JOptionPane (javax.swing)
  • Top plugins for Android Studio
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