JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins

« « « Anklang Documentation
Loading...
Searching...
No Matches
juce_FileSearchPath.h
Go to the documentation of this file.
1 /*
2 ==============================================================================
3
4 This file is part of the JUCE library.
5 Copyright (c) 2022 - Raw Material Software Limited
6
7 JUCE is an open source library subject to commercial or open-source
8 licensing.
9
10 The code included in this file is provided under the terms of the ISC license
11 http://www.isc.org/downloads/software-support-policy/isc-license. Permission
12 To use, copy, modify, and/or distribute this software for any purpose with or
13 without fee is hereby granted provided that the above copyright notice and
14 this permission notice appear in all copies.
15
16 JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
17 EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
18 DISCLAIMED.
19
20 ==============================================================================
21*/
22
23namespace juce
24{
25
26//==============================================================================
34class JUCE_API FileSearchPath
35{
36public:
37 //==============================================================================
39 FileSearchPath() = default;
40
42 ~FileSearchPath() = default;
43
51 FileSearchPath (const String& path);
52
55
57 FileSearchPath& operator= (const FileSearchPath&);
58
64 FileSearchPath& operator= (const String& path);
65
66 //==============================================================================
70 int getNumPaths() const;
71
76 File operator[] (int index) const;
77
87 String getRawString (int index) const;
88
90 String toString() const;
91
93 String toStringWithSeparator (StringRef separator) const;
94
95 //==============================================================================
101 void add (const File& directoryToAdd,
102 int insertIndex = -1);
103
108 bool addIfNotAlreadyThere (const File& directoryToAdd);
109
111 void remove (int indexToRemove);
112
116 void addPath (const FileSearchPath&);
117
125 void removeRedundantPaths();
126
128 void removeNonExistentPaths();
129
130 //==============================================================================
143 Array<File> findChildFiles (int whatToLookFor,
144 bool searchRecursively,
145 const String& wildCardPattern = "*") const;
146
152 int findChildFiles (Array<File>& results,
153 int whatToLookFor,
154 bool searchRecursively,
155 const String& wildCardPattern = "*") const;
156
157 //==============================================================================
173 bool isFileInPath (const File& fileToCheck,
174 bool checkRecursively) const;
175
176private:
177 //==============================================================================
178 StringArray directories;
179
180 void init (const String&);
181
183};
184
185} // namespace juce
Holds a resizable array of primitive or copy-by-value objects.
Definition juce_Array.h:56
Represents a set of folders that make up a search path.
~FileSearchPath()=default
Destructor.
FileSearchPath()=default
Creates an empty search path.
Represents a local file or directory.
Definition juce_File.h:45
A special array for holding a list of strings.
A simple class for holding temporary references to a string literal or String.
The JUCE String class!
Definition juce_String.h:53
#define JUCE_LEAK_DETECTOR(OwnerClass)
This macro lets you embed a leak-detecting object inside a class.
JUCE Namespace.
remove