Gin
|
Watches a folder in the file system for changes. More...
Classes | |
class | Listener |
Receives callbacks from the FileSystemWatcher when a file changes. More... | |
Public Types | |
enum | FileSystemEvent { undefined , fileCreated , fileDeleted , fileUpdated , fileRenamedOldName , fileRenamedNewName } |
A set of events that can happen to a file. More... | |
Public Member Functions | |
FileSystemWatcher () | |
~FileSystemWatcher () | |
void | addFolder (const juce::File &folder) |
Adds a folder to be watched. More... | |
void | removeFolder (const juce::File &folder) |
Removes a folder from being watched. More... | |
void | removeAllFolders () |
Removes all folders from being watched. More... | |
juce::Array< juce::File > | getWatchedFolders () |
Gets a list of folders being watched. More... | |
void | addListener (Listener *newListener) |
Registers a listener to be told when things happen to the text. More... | |
void | removeListener (Listener *listener) |
Deregisters a listener. More... | |
Watches a folder in the file system for changes.
Listener callbcks will be called every time a file is created, modified, deleted or renamed in the watched folder.
FileSystemWatcher will also recursively watch all subfolders on macOS and windows and will not on Linux.
FileSystemWatcher::FileSystemWatcher | ( | ) |
FileSystemWatcher::~FileSystemWatcher | ( | ) |
void FileSystemWatcher::addFolder | ( | const juce::File & | folder | ) |
Adds a folder to be watched.
void FileSystemWatcher::removeFolder | ( | const juce::File & | folder | ) |
Removes a folder from being watched.
void FileSystemWatcher::removeAllFolders | ( | ) |
Removes all folders from being watched.
juce::Array<juce::File> FileSystemWatcher::getWatchedFolders | ( | ) |
Gets a list of folders being watched.
void FileSystemWatcher::addListener | ( | Listener * | newListener | ) |
Registers a listener to be told when things happen to the text.
void FileSystemWatcher::removeListener | ( | Listener * | listener | ) |
Deregisters a listener.