Interface FileManager

All Known Implementing Classes:
FileManagerImpl

public interface FileManager
user: Ildar date: 10.02.15
  • Method Details

    • delete

      void delete(Path path) throws IOException
      Throws:
      IOException
    • move

      Path move(Path target, Path newParent) throws IOException
      Throws:
      IOException
    • rename

      Path rename(Path target, String newName) throws IOException
      Throws:
      IOException
    • fireApiFileModified

      void fireApiFileModified(Path file)
    • createFile

      Path createFile(Path file, String fileName) throws IOException
      Throws:
      IOException
    • createDirectory

      Path createDirectory(Path file, String dirName) throws IOException
      Throws:
      IOException
    • addFileListener

      void addFileListener(FileListener listener)
    • addFileListener

      void addFileListener(FileListener listener, Disposable parent)
    • addFileApiListener

      void addFileApiListener(FileListener listener)
    • removeFileListener

      void removeFileListener(FileListener listener)
    • removeFileApiListener

      void removeFileApiListener(FileListener listener)
    • fireBeforeFileDeletion

      void fireBeforeFileDeletion(Path file)
    • fireFileRenamed

      void fireFileRenamed(Path oldFile, Path newFile)
    • fireFileMoved

      void fireFileMoved(Path file, Path oldParent, Path newParent)
    • isPathInIgnoreList

      boolean isPathInIgnoreList(Path path)
    • isContainedInPath

      boolean isContainedInPath(Path path, Path pathInBaseDir)
    • getFiles

      default List<Path> getFiles(Path dir) throws IOException
      Returns a list of all non-ignored regular files in a dir, recursively
      Parameters:
      dir - base directory
      Returns:
      list of all file paths
      Throws:
      IOException - if an IO exception occurs
    • getFiles

      List<Path> getFiles(Path dir, InputFilter inputFilter) throws IOException
      Returns all regular files in specified that are not ignored and satisfy a filter, recursively
      Parameters:
      dir - base directory
      inputFilter - filter for regular file paths
      Returns:
      list of all file paths
      Throws:
      IOException - if an IO exception occurs
    • forEachFile

      void forEachFile(Path basedir, Consumer<Path> action) throws IOException
      Runs specified action for each file in specified folder that is not in ignore list, recursively This method does nothing if basedir itself is in ignore list
      Parameters:
      basedir - base directory
      action - action to run
      Throws:
      IOException - if an IO exception occurs
    • getFilesState

      String getFilesState(Path dir) throws IOException
      Throws:
      IOException
    • getFilesState

      String getFilesState() throws IOException
      Throws:
      IOException
    • getSnapshot

      FilesSnapshot getSnapshot() throws IOException
      Получить слепок файлов проекта
      Throws:
      IOException
    • getDiff

      FilesDiff getDiff(FilesSnapshot filesSnapshot) throws IOException
      Получить diff между старыми файлами и текущими
      Throws:
      IOException
    • suspendWatching

      void suspendWatching()
    • resumeWatching

      void resumeWatching()