org.openide.filesystems.FileUtil.addRecursiveListener()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(3.7k)|赞(0)|评价(0)|浏览(112)

本文整理了Java中org.openide.filesystems.FileUtil.addRecursiveListener()方法的一些代码示例,展示了FileUtil.addRecursiveListener()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FileUtil.addRecursiveListener()方法的具体详情如下:
包路径:org.openide.filesystems.FileUtil
类名称:FileUtil
方法名:addRecursiveListener

FileUtil.addRecursiveListener介绍

[英]Works like #addRecursiveListener(org.openide.filesystems.FileChangeListener,java.io.File,java.io.FileFilter,java.util.concurrent.Callable).
[中]类似于#addRecursiveListener(org.openide.filesystems.FileChangeListener、java.io.File、java.io.FileFilter、java.util.concurrent.Callable)。

代码示例

代码示例来源:origin: org.netbeans.api/org-openide-filesystems

/**
 * Works like {@link #addRecursiveListener(org.openide.filesystems.FileChangeListener, java.io.File, java.io.FileFilter, java.util.concurrent.Callable) 
 * addRecursiveListener(listener, path, null, null)}.
 *
 * @param listener FileChangeListener to listen to changes in path
 * @param path File path to listen to (even not existing)
 *
 * @since org.openide.filesystems 7.28
 */
public static void addRecursiveListener(FileChangeListener listener, File path) {
  addRecursiveListener(listener, path, null, null);
}

代码示例来源:origin: org.netbeans.api/org-openide-filesystems

/** Works like {@link #addRecursiveListener(org.openide.filesystems.FileChangeListener, java.io.File, java.io.FileFilter, java.util.concurrent.Callable) 
 * addRecursiveListener(listener, path, null, stop)}.
 *
 * @param listener FileChangeListener to listen to changes in path
 * @param path File path to listen to (even not existing)
 * @param stop an interface to interrupt the process of registering
 *    the listener. If the <code>call</code> returns true, the process
 *    of registering the listener is immediately interrupted
 *
 * @see FileObject#addRecursiveListener
 * @since org.openide.filesystems 7.37
 */
public static void addRecursiveListener(FileChangeListener listener, File path, Callable<Boolean> stop) {
  addRecursiveListener(listener, path, null, stop);
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-mercurial

@Override
  public void run() {
    FileUtil.addRecursiveListener(fList, hgFolder);
  }
});

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-web-clientproject

private synchronized void addSiteRootListener() {
  assert siteRootFolder == null : "Should not be listening to " + siteRootFolder;
  FileObject siteRoot = project.getSiteRootFolder();
  if (siteRoot == null) {
    // broken project
    return;
  }
  siteRootFolder = FileUtil.toFile(siteRoot);
  if (siteRootFolder == null) {
    // should not happen
    LOGGER.log(Level.WARNING, "File not found for FileObject: {0}", siteRoot);
    return;
  }
  siteRootChangesListener = new SiteRootFolderListener(project);
  FileUtil.addRecursiveListener(siteRootChangesListener, siteRootFolder);
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-php-project

void addSourceDirListener() {
  FileObject sourcesDirectory = getSourcesDirectory();
  if (sourcesDirectory == null) {
    return;
  }
  if (sourcesDirectory.equals(sourceDirectoryFileChangeListener.getSourceDir())) {
    // already listening to this source dir
    // this usually happens for new project - property change is fired _before_ project open
    return;
  }
  synchronized (sourceDirectoryFileChangeListener) {
    sourceDirectoryFileChangeListener.setSourceDir(sourcesDirectory);
    FileUtil.addRecursiveListener(sourceDirectoryFileChangeListener, FileUtil.toFile(sourcesDirectory), new FileFilter() {
      @Override
      public boolean accept(File pathname) {
        return isVisible(pathname);
      }
    }, null);
  }
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-php-project

FileUtil.addRecursiveListener(fileChangeListener, FileUtil.toFile(getSources()), new Callable<Boolean>() {
  @Override
  public Boolean call() throws Exception {

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-javaee-project

FileUtil.addRecursiveListener(this, file);
listeningTo.put(file, artifactItem.getDescription());
if (synchronize) {

相关文章