#include <juce_FileSearchPath.h>
Public Member Functions | |
| FileSearchPath ()=default | |
| ~FileSearchPath ()=default | |
| FileSearchPath (const String &path) | |
| FileSearchPath (const FileSearchPath &) | |
| FileSearchPath & | operator= (const FileSearchPath &) |
| FileSearchPath & | operator= (const String &path) |
| int | getNumPaths () const |
| File | operator[] (int index) const |
| String | getRawString (int index) const |
| String | toString () const |
| String | toStringWithSeparator (StringRef separator) const |
| void | add (const File &directoryToAdd, int insertIndex=-1) |
| bool | addIfNotAlreadyThere (const File &directoryToAdd) |
| void | remove (int indexToRemove) |
| void | addPath (const FileSearchPath &) |
| void | removeRedundantPaths () |
| void | removeNonExistentPaths () |
| Array< File > | findChildFiles (int whatToLookFor, bool searchRecursively, const String &wildCardPattern="*") const |
| int | findChildFiles (Array< File > &results, int whatToLookFor, bool searchRecursively, const String &wildCardPattern="*") const |
| bool | isFileInPath (const File &fileToCheck, bool checkRecursively) const |
Represents a set of folders that make up a search path.
Definition at line 34 of file juce_FileSearchPath.h.
|
default |
Creates an empty search path.
Referenced by addPath(), FileSearchPath(), operator=(), operator=(), and ~FileSearchPath().
|
default |
Destructor.
| juce::FileSearchPath::FileSearchPath | ( | const String & | path | ) |
Creates a search path from a string of pathnames.
The path can be semicolon- or comma-separated, e.g. "/foo/bar;/foo/moose;/fish/moose"
The separate folders are tokenised and added to the search path.
Definition at line 26 of file juce_FileSearchPath.cpp.
| juce::FileSearchPath::FileSearchPath | ( | const FileSearchPath & | other | ) |
Creates a copy of another search path.
Definition at line 31 of file juce_FileSearchPath.cpp.
| void juce::FileSearchPath::add | ( | const File & | directoryToAdd, |
| int | insertIndex = -1 ) |
Adds a new directory to the search path.
The new directory is added to the end of the list if the insertIndex parameter is less than zero, otherwise it is inserted at the given index.
Definition at line 90 of file juce_FileSearchPath.cpp.
Referenced by addIfNotAlreadyThere(), and ~FileSearchPath().
| bool juce::FileSearchPath::addIfNotAlreadyThere | ( | const File & | directoryToAdd | ) |
Adds a new directory to the search path if it's not already in there.
Definition at line 95 of file juce_FileSearchPath.cpp.
Referenced by addPath(), and ~FileSearchPath().
| void juce::FileSearchPath::addPath | ( | const FileSearchPath & | other | ) |
Merges another search path into this one. This will remove any duplicate directories.
Definition at line 110 of file juce_FileSearchPath.cpp.
Referenced by ~FileSearchPath().
| int juce::FileSearchPath::findChildFiles | ( | Array< File > & | results, |
| int | whatToLookFor, | ||
| bool | searchRecursively, | ||
| const String & | wildCardPattern = "*" ) const |
Searches the path for a wildcard. Note that there's a newer, better version of this method which returns the results array, and in almost all cases, you should use that one instead! This one is kept around mainly for legacy code to use.
Definition at line 158 of file juce_FileSearchPath.cpp.
| Array< File > juce::FileSearchPath::findChildFiles | ( | int | whatToLookFor, |
| bool | searchRecursively, | ||
| const String & | wildCardPattern = "*" ) const |
Searches the path for a wildcard.
This will search all the directories in the search path in order and return an array of the files that were found.
| whatToLookFor | a value from the File::TypesOfFileToFind enum, specifying whether to return files, directories, or both. |
| searchRecursively | whether to recursively search the subdirectories too |
| wildCardPattern | a pattern to match against the filenames |
Definition at line 151 of file juce_FileSearchPath.cpp.
Referenced by findChildFiles(), and ~FileSearchPath().