LMMS
Loading...
Searching...
No Matches
plugins
CarlaBase
carla
source
modules
juce_core
files
juce_RangedDirectoryIterator.cpp
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
23
namespace
juce
24
{
25
26
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE
(
"-Wdeprecated-declarations"
)
27
JUCE_BEGIN_IGNORE_WARNINGS_MSVC
(4996)
28
29
float
DirectoryEntry
::
getEstimatedProgress
()
const
30
{
31
if
(
auto
it =
iterator
.lock())
32
return
it->getEstimatedProgress();
33
34
return
0.0f;
35
}
36
37
// We implement this in terms of the deprecated DirectoryIterator,
38
// but the old DirectoryIterator might go away in the future!
39
RangedDirectoryIterator::RangedDirectoryIterator
(
const
File
& directory,
40
bool
isRecursive,
41
const
String
& wildCard,
42
int
whatToLookFor,
43
File::FollowSymlinks
followSymlinks)
44
:
iterator
(new
DirectoryIterator
(directory,
45
isRecursive,
46
wildCard,
47
whatToLookFor,
48
followSymlinks))
49
{
50
entry
.iterator =
iterator
;
51
increment
();
52
}
53
54
bool
RangedDirectoryIterator::next
()
55
{
56
const
auto
result
=
iterator
->next (&
entry
.directory,
57
&
entry
.hidden,
58
&
entry
.fileSize,
59
&
entry
.modTime,
60
&
entry
.creationTime,
61
&
entry
.readOnly);
62
if
(
result
)
63
entry
.file =
iterator
->getFile();
64
else
65
entry
= {};
66
67
return
result
;
68
}
69
70
void
RangedDirectoryIterator::increment
()
71
{
72
if
(
iterator
!=
nullptr
&& !
next
())
73
iterator
=
nullptr
;
74
}
75
76
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
77
JUCE_END_IGNORE_WARNINGS_MSVC
78
79
}
// namespace juce
juce::DirectoryEntry
Definition
juce_RangedDirectoryIterator.h:36
juce::DirectoryEntry::iterator
std::weak_ptr< DirectoryIterator > iterator
Definition
juce_RangedDirectoryIterator.h:65
juce::DirectoryEntry::getEstimatedProgress
float getEstimatedProgress() const
Definition
juce_RangedDirectoryIterator.cpp:29
juce::DirectoryIterator
Definition
juce_DirectoryIterator.h:56
juce::File
Definition
juce_File.h:45
juce::File::FollowSymlinks
FollowSymlinks
Definition
juce_File.h:566
juce::RangedDirectoryIterator::RangedDirectoryIterator
RangedDirectoryIterator()=default
juce::RangedDirectoryIterator::increment
void increment()
Definition
juce_RangedDirectoryIterator.cpp:70
juce::RangedDirectoryIterator::next
bool next()
Definition
juce_RangedDirectoryIterator.cpp:54
juce::RangedDirectoryIterator::iterator
std::shared_ptr< DirectoryIterator > iterator
Definition
juce_RangedDirectoryIterator.h:172
juce::RangedDirectoryIterator::entry
DirectoryEntry entry
Definition
juce_RangedDirectoryIterator.h:173
juce::String
Definition
juce_String.h:53
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE
#define JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE(...)
Definition
juce_CompilerWarnings.h:181
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
#define JUCE_END_IGNORE_WARNINGS_GCC_LIKE
Definition
juce_CompilerWarnings.h:182
JUCE_BEGIN_IGNORE_WARNINGS_MSVC
#define JUCE_BEGIN_IGNORE_WARNINGS_MSVC(warnings)
Definition
juce_CompilerWarnings.h:198
JUCE_END_IGNORE_WARNINGS_MSVC
#define JUCE_END_IGNORE_WARNINGS_MSVC
Definition
juce_CompilerWarnings.h:199
juce
Definition
carla_juce.cpp:31
result
int result
Definition
process.c:1455
Generated on
for LMMS by
1.16.1