OpenShot Audio Library | OpenShotAudio 0.3.2
Loading...
Searching...
No Matches
juce_FileSearchPath.h
1/*
2 ==============================================================================
3
4 This file is part of the JUCE library.
5 Copyright (c) 2017 - ROLI Ltd.
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 //==============================================================================
40
48 FileSearchPath (const String& path);
49
52
55
58
64 FileSearchPath& operator= (const String& path);
65
66 //==============================================================================
70 int getNumPaths() const;
71
76 File operator[] (int index) const;
77
79 String toString() const;
80
81 //==============================================================================
87 void add (const File& directoryToAdd,
88 int insertIndex = -1);
89
94 bool addIfNotAlreadyThere (const File& directoryToAdd);
95
97 void remove (int indexToRemove);
98
102 void addPath (const FileSearchPath&);
103
111 void removeRedundantPaths();
112
114 void removeNonExistentPaths();
115
116 //==============================================================================
129 Array<File> findChildFiles (int whatToLookFor,
131 const String& wildCardPattern = "*") const;
132
138 int findChildFiles (Array<File>& results,
139 int whatToLookFor,
141 const String& wildCardPattern = "*") const;
142
143 //==============================================================================
159 bool isFileInPath (const File& fileToCheck,
160 bool checkRecursively) const;
161
162private:
163 //==============================================================================
164 StringArray directories;
165
166 void init (const String&);
167
168 JUCE_LEAK_DETECTOR (FileSearchPath)
169};
170
171} // namespace juce