Package ru.cg.webbpm.studio.core.api.io
Interface FileManager
- All Known Implementing Classes:
FileManagerImpl
public interface FileManager
user: Ildar
date: 10.02.15
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addFileApiListener
(FileListener listener) void
addFileListener
(FileListener listener) void
addFileListener
(FileListener listener, Disposable parent) createDirectory
(Path file, String dirName) createFile
(Path file, String fileName) void
void
fireApiFileModified
(Path file) void
fireBeforeFileDeletion
(Path file) void
fireFileMoved
(Path file, Path oldParent, Path newParent) void
fireFileRenamed
(Path oldFile, Path newFile) void
forEachFile
(Path basedir, Consumer<Path> action) 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 listgetDiff
(FilesSnapshot filesSnapshot) Получить diff между старыми файлами и текущимиReturns a list of all non-ignored regular files in a dir, recursivelygetFiles
(Path dir, InputFilter inputFilter) Returns all regular files in specified that are not ignored and satisfy a filter, recursivelygetFilesState
(Path dir) Получить слепок файлов проектаboolean
isContainedInPath
(Path path, Path pathInBaseDir) boolean
isPathInIgnoreList
(Path path) void
removeFileApiListener
(FileListener listener) void
removeFileListener
(FileListener listener) void
void
-
Method Details
-
delete
- Throws:
IOException
-
move
- Throws:
IOException
-
rename
- Throws:
IOException
-
fireApiFileModified
-
createFile
- Throws:
IOException
-
createDirectory
- Throws:
IOException
-
addFileListener
-
addFileListener
-
addFileApiListener
-
removeFileListener
-
removeFileApiListener
-
fireBeforeFileDeletion
-
fireFileRenamed
-
fireFileMoved
-
isPathInIgnoreList
-
isContainedInPath
-
getFiles
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
Returns all regular files in specified that are not ignored and satisfy a filter, recursively- Parameters:
dir
- base directoryinputFilter
- filter for regular file paths- Returns:
- list of all file paths
- Throws:
IOException
- if an IO exception occurs
-
forEachFile
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 directoryaction
- action to run- Throws:
IOException
- if an IO exception occurs
-
getFilesState
- Throws:
IOException
-
getFilesState
- Throws:
IOException
-
getSnapshot
Получить слепок файлов проекта- Throws:
IOException
-
getDiff
Получить diff между старыми файлами и текущими- Throws:
IOException
-
suspendWatching
void suspendWatching() -
resumeWatching
void resumeWatching()
-