openshot-audio  0.1.4
juce_FileSearchPath.h
Go to the documentation of this file.
1 /*
2  ==============================================================================
3 
4  This file is part of the juce_core module of the JUCE library.
5  Copyright (c) 2015 - ROLI Ltd.
6 
7  Permission to use, copy, modify, and/or distribute this software for any purpose with
8  or without fee is hereby granted, provided that the above copyright notice and this
9  permission notice appear in all copies.
10 
11  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
12  TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
13  NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14  DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
15  IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
16  CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 
18  ------------------------------------------------------------------------------
19 
20  NOTE! This permissive ISC license applies ONLY to files within the juce_core module!
21  All other JUCE modules are covered by a dual GPL/commercial license, so if you are
22  using any other modules, be sure to check that you also comply with their license.
23 
24  For more details, visit www.juce.com
25 
26  ==============================================================================
27 */
28 
29 #ifndef JUCE_FILESEARCHPATH_H_INCLUDED
30 #define JUCE_FILESEARCHPATH_H_INCLUDED
31 
32 
33 //==============================================================================
40 {
41 public:
42  //==============================================================================
45 
53  FileSearchPath (const String& path);
54 
57 
59  FileSearchPath& operator= (const FileSearchPath&);
60 
62  ~FileSearchPath();
63 
69  FileSearchPath& operator= (const String& path);
70 
71  //==============================================================================
75  int getNumPaths() const;
76 
81  File operator[] (int index) const;
82 
84  String toString() const;
85 
86  //==============================================================================
92  void add (const File& directoryToAdd,
93  int insertIndex = -1);
94 
96  void addIfNotAlreadyThere (const File& directoryToAdd);
97 
99  void remove (int indexToRemove);
100 
104  void addPath (const FileSearchPath&);
105 
113  void removeRedundantPaths();
114 
116  void removeNonExistentPaths();
117 
118  //==============================================================================
132  int findChildFiles (Array<File>& results,
133  int whatToLookFor,
134  bool searchRecursively,
135  const String& wildCardPattern = "*") const;
136 
137  //==============================================================================
153  bool isFileInPath (const File& fileToCheck,
154  bool checkRecursively) const;
155 
156 private:
157  //==============================================================================
158  StringArray directories;
159 
160  void init (const String&);
161 
163 };
164 
165 #endif // JUCE_FILESEARCHPATH_H_INCLUDED
Definition: juce_String.h:43
#define JUCE_API
Definition: juce_StandardHeader.h:139
Definition: juce_FileSearchPath.h:39
Definition: juce_StringArray.h:39
#define JUCE_LEAK_DETECTOR(OwnerClass)
Definition: juce_LeakedObjectDetector.h:141
Definition: juce_File.h:45