Example usage for org.apache.commons.io.monitor FileEntry newChildInstance

List of usage examples for org.apache.commons.io.monitor FileEntry newChildInstance

Introduction

In this page you can find the example usage for org.apache.commons.io.monitor FileEntry newChildInstance.

Prototype

public FileEntry newChildInstance(File file) 

Source Link

Document

Create a new child instance.

Usage

From source file:com.owncloud.android.services.observer.AdvancedFileAlterationObserver.java

/**
 * Create a new file entry for the specified file.
 *
 * @param parent The parent file entry/*from   w  ww  . j av a 2  s  .c o m*/
 * @param file   The file to create an entry for
 * @return A new file entry
 */
private FileEntry createFileEntry(final FileEntry parent, final File file) {
    final FileEntry entry = parent.newChildInstance(file);
    entry.refresh(file);
    final FileEntry[] children = doListFiles(file, entry);
    entry.setChildren(children);
    return entry;
}