mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Files: Add RangedDirectoryIterator
This commit is contained in:
parent
5f348c3040
commit
e7e1de78fa
59 changed files with 481 additions and 84 deletions
|
|
@ -687,6 +687,8 @@ add_library( ${BINARY_NAME}
|
|||
"../../../../../modules/juce_core/files/juce_FileSearchPath.cpp"
|
||||
"../../../../../modules/juce_core/files/juce_FileSearchPath.h"
|
||||
"../../../../../modules/juce_core/files/juce_MemoryMappedFile.h"
|
||||
"../../../../../modules/juce_core/files/juce_RangedDirectoryIterator.cpp"
|
||||
"../../../../../modules/juce_core/files/juce_RangedDirectoryIterator.h"
|
||||
"../../../../../modules/juce_core/files/juce_TemporaryFile.cpp"
|
||||
"../../../../../modules/juce_core/files/juce_TemporaryFile.h"
|
||||
"../../../../../modules/juce_core/files/juce_WildcardFileFilter.cpp"
|
||||
|
|
@ -2293,6 +2295,8 @@ set_source_files_properties("../../../../../modules/juce_core/files/juce_FileOut
|
|||
set_source_files_properties("../../../../../modules/juce_core/files/juce_FileSearchPath.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
set_source_files_properties("../../../../../modules/juce_core/files/juce_FileSearchPath.h" PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
set_source_files_properties("../../../../../modules/juce_core/files/juce_MemoryMappedFile.h" PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
set_source_files_properties("../../../../../modules/juce_core/files/juce_RangedDirectoryIterator.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
set_source_files_properties("../../../../../modules/juce_core/files/juce_RangedDirectoryIterator.h" PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
set_source_files_properties("../../../../../modules/juce_core/files/juce_TemporaryFile.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
set_source_files_properties("../../../../../modules/juce_core/files/juce_TemporaryFile.h" PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
set_source_files_properties("../../../../../modules/juce_core/files/juce_WildcardFileFilter.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
|
|
|
|||
|
|
@ -926,6 +926,9 @@
|
|||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
|
|
@ -2615,6 +2618,7 @@
|
|||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_FileOutputStream.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_MemoryMappedFile.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_WildcardFileFilter.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\javascript\juce_Javascript.h"/>
|
||||
|
|
|
|||
|
|
@ -1357,6 +1357,9 @@
|
|||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.cpp">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.cpp">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.cpp">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClCompile>
|
||||
|
|
@ -3912,6 +3915,9 @@
|
|||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_MemoryMappedFile.h">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.h">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.h">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClInclude>
|
||||
|
|
|
|||
|
|
@ -926,6 +926,9 @@
|
|||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
|
|
@ -2615,6 +2618,7 @@
|
|||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_FileOutputStream.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_MemoryMappedFile.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_WildcardFileFilter.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\javascript\juce_Javascript.h"/>
|
||||
|
|
|
|||
|
|
@ -1357,6 +1357,9 @@
|
|||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.cpp">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.cpp">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.cpp">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClCompile>
|
||||
|
|
@ -3912,6 +3915,9 @@
|
|||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_MemoryMappedFile.h">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.h">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.h">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClInclude>
|
||||
|
|
|
|||
|
|
@ -926,6 +926,9 @@
|
|||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
|
|
@ -2615,6 +2618,7 @@
|
|||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_FileOutputStream.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_MemoryMappedFile.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_WildcardFileFilter.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\javascript\juce_Javascript.h"/>
|
||||
|
|
|
|||
|
|
@ -1357,6 +1357,9 @@
|
|||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.cpp">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.cpp">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.cpp">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClCompile>
|
||||
|
|
@ -3912,6 +3915,9 @@
|
|||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_MemoryMappedFile.h">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.h">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.h">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClInclude>
|
||||
|
|
|
|||
|
|
@ -526,6 +526,8 @@ add_library( ${BINARY_NAME}
|
|||
"../../../../../modules/juce_core/files/juce_FileSearchPath.cpp"
|
||||
"../../../../../modules/juce_core/files/juce_FileSearchPath.h"
|
||||
"../../../../../modules/juce_core/files/juce_MemoryMappedFile.h"
|
||||
"../../../../../modules/juce_core/files/juce_RangedDirectoryIterator.cpp"
|
||||
"../../../../../modules/juce_core/files/juce_RangedDirectoryIterator.h"
|
||||
"../../../../../modules/juce_core/files/juce_TemporaryFile.cpp"
|
||||
"../../../../../modules/juce_core/files/juce_TemporaryFile.h"
|
||||
"../../../../../modules/juce_core/files/juce_WildcardFileFilter.cpp"
|
||||
|
|
@ -1816,6 +1818,8 @@ set_source_files_properties("../../../../../modules/juce_core/files/juce_FileOut
|
|||
set_source_files_properties("../../../../../modules/juce_core/files/juce_FileSearchPath.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
set_source_files_properties("../../../../../modules/juce_core/files/juce_FileSearchPath.h" PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
set_source_files_properties("../../../../../modules/juce_core/files/juce_MemoryMappedFile.h" PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
set_source_files_properties("../../../../../modules/juce_core/files/juce_RangedDirectoryIterator.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
set_source_files_properties("../../../../../modules/juce_core/files/juce_RangedDirectoryIterator.h" PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
set_source_files_properties("../../../../../modules/juce_core/files/juce_TemporaryFile.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
set_source_files_properties("../../../../../modules/juce_core/files/juce_TemporaryFile.h" PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
set_source_files_properties("../../../../../modules/juce_core/files/juce_WildcardFileFilter.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
|
|
|
|||
|
|
@ -712,6 +712,9 @@
|
|||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
|
|
@ -2136,6 +2139,7 @@
|
|||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_FileOutputStream.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_MemoryMappedFile.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_WildcardFileFilter.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\javascript\juce_Javascript.h"/>
|
||||
|
|
|
|||
|
|
@ -994,6 +994,9 @@
|
|||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.cpp">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.cpp">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.cpp">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClCompile>
|
||||
|
|
@ -3087,6 +3090,9 @@
|
|||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_MemoryMappedFile.h">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.h">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.h">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClInclude>
|
||||
|
|
|
|||
|
|
@ -543,6 +543,8 @@ add_library( ${BINARY_NAME}
|
|||
"../../../../../modules/juce_core/files/juce_FileSearchPath.cpp"
|
||||
"../../../../../modules/juce_core/files/juce_FileSearchPath.h"
|
||||
"../../../../../modules/juce_core/files/juce_MemoryMappedFile.h"
|
||||
"../../../../../modules/juce_core/files/juce_RangedDirectoryIterator.cpp"
|
||||
"../../../../../modules/juce_core/files/juce_RangedDirectoryIterator.h"
|
||||
"../../../../../modules/juce_core/files/juce_TemporaryFile.cpp"
|
||||
"../../../../../modules/juce_core/files/juce_TemporaryFile.h"
|
||||
"../../../../../modules/juce_core/files/juce_WildcardFileFilter.cpp"
|
||||
|
|
@ -1906,6 +1908,8 @@ set_source_files_properties("../../../../../modules/juce_core/files/juce_FileOut
|
|||
set_source_files_properties("../../../../../modules/juce_core/files/juce_FileSearchPath.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
set_source_files_properties("../../../../../modules/juce_core/files/juce_FileSearchPath.h" PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
set_source_files_properties("../../../../../modules/juce_core/files/juce_MemoryMappedFile.h" PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
set_source_files_properties("../../../../../modules/juce_core/files/juce_RangedDirectoryIterator.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
set_source_files_properties("../../../../../modules/juce_core/files/juce_RangedDirectoryIterator.h" PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
set_source_files_properties("../../../../../modules/juce_core/files/juce_TemporaryFile.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
set_source_files_properties("../../../../../modules/juce_core/files/juce_TemporaryFile.h" PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
set_source_files_properties("../../../../../modules/juce_core/files/juce_WildcardFileFilter.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
|
|
|
|||
|
|
@ -719,6 +719,9 @@
|
|||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
|
|
@ -2212,6 +2215,7 @@
|
|||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_FileOutputStream.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_MemoryMappedFile.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_WildcardFileFilter.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\javascript\juce_Javascript.h"/>
|
||||
|
|
|
|||
|
|
@ -1051,6 +1051,9 @@
|
|||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.cpp">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.cpp">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.cpp">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClCompile>
|
||||
|
|
@ -3240,6 +3243,9 @@
|
|||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_MemoryMappedFile.h">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.h">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.h">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClInclude>
|
||||
|
|
|
|||
|
|
@ -719,6 +719,9 @@
|
|||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
|
|
@ -2212,6 +2215,7 @@
|
|||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_FileOutputStream.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_MemoryMappedFile.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_WildcardFileFilter.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\javascript\juce_Javascript.h"/>
|
||||
|
|
|
|||
|
|
@ -1051,6 +1051,9 @@
|
|||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.cpp">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.cpp">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.cpp">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClCompile>
|
||||
|
|
@ -3240,6 +3243,9 @@
|
|||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_MemoryMappedFile.h">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.h">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.h">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClInclude>
|
||||
|
|
|
|||
|
|
@ -719,6 +719,9 @@
|
|||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
|
|
@ -2212,6 +2215,7 @@
|
|||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_FileOutputStream.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_MemoryMappedFile.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_WildcardFileFilter.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\javascript\juce_Javascript.h"/>
|
||||
|
|
|
|||
|
|
@ -1051,6 +1051,9 @@
|
|||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.cpp">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.cpp">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.cpp">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClCompile>
|
||||
|
|
@ -3240,6 +3243,9 @@
|
|||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_MemoryMappedFile.h">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.h">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.h">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClInclude>
|
||||
|
|
|
|||
|
|
@ -187,6 +187,9 @@
|
|||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
|
|
@ -469,6 +472,7 @@
|
|||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_FileOutputStream.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_MemoryMappedFile.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_WildcardFileFilter.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\javascript\juce_Javascript.h"/>
|
||||
|
|
|
|||
|
|
@ -127,6 +127,9 @@
|
|||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.cpp">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.cpp">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.cpp">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClCompile>
|
||||
|
|
@ -477,6 +480,9 @@
|
|||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_MemoryMappedFile.h">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.h">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.h">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClInclude>
|
||||
|
|
|
|||
|
|
@ -530,6 +530,8 @@ add_library( ${BINARY_NAME}
|
|||
"../../../../../modules/juce_core/files/juce_FileSearchPath.cpp"
|
||||
"../../../../../modules/juce_core/files/juce_FileSearchPath.h"
|
||||
"../../../../../modules/juce_core/files/juce_MemoryMappedFile.h"
|
||||
"../../../../../modules/juce_core/files/juce_RangedDirectoryIterator.cpp"
|
||||
"../../../../../modules/juce_core/files/juce_RangedDirectoryIterator.h"
|
||||
"../../../../../modules/juce_core/files/juce_TemporaryFile.cpp"
|
||||
"../../../../../modules/juce_core/files/juce_TemporaryFile.h"
|
||||
"../../../../../modules/juce_core/files/juce_WildcardFileFilter.cpp"
|
||||
|
|
@ -1895,6 +1897,8 @@ set_source_files_properties("../../../../../modules/juce_core/files/juce_FileOut
|
|||
set_source_files_properties("../../../../../modules/juce_core/files/juce_FileSearchPath.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
set_source_files_properties("../../../../../modules/juce_core/files/juce_FileSearchPath.h" PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
set_source_files_properties("../../../../../modules/juce_core/files/juce_MemoryMappedFile.h" PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
set_source_files_properties("../../../../../modules/juce_core/files/juce_RangedDirectoryIterator.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
set_source_files_properties("../../../../../modules/juce_core/files/juce_RangedDirectoryIterator.h" PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
set_source_files_properties("../../../../../modules/juce_core/files/juce_TemporaryFile.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
set_source_files_properties("../../../../../modules/juce_core/files/juce_TemporaryFile.h" PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
set_source_files_properties("../../../../../modules/juce_core/files/juce_WildcardFileFilter.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
|
|
|
|||
|
|
@ -712,6 +712,9 @@
|
|||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
|
|
@ -2221,6 +2224,7 @@
|
|||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_FileOutputStream.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_MemoryMappedFile.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_WildcardFileFilter.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\javascript\juce_Javascript.h"/>
|
||||
|
|
|
|||
|
|
@ -1024,6 +1024,9 @@
|
|||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.cpp">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.cpp">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.cpp">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClCompile>
|
||||
|
|
@ -3222,6 +3225,9 @@
|
|||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_MemoryMappedFile.h">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.h">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.h">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClInclude>
|
||||
|
|
|
|||
|
|
@ -328,6 +328,9 @@
|
|||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
|
|
@ -1716,6 +1719,7 @@
|
|||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_FileOutputStream.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_MemoryMappedFile.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_WildcardFileFilter.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\javascript\juce_Javascript.h"/>
|
||||
|
|
|
|||
|
|
@ -613,6 +613,9 @@
|
|||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.cpp">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.cpp">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.cpp">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClCompile>
|
||||
|
|
@ -2559,6 +2562,9 @@
|
|||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_MemoryMappedFile.h">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.h">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.h">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClInclude>
|
||||
|
|
|
|||
|
|
@ -328,6 +328,9 @@
|
|||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
|
|
@ -1716,6 +1719,7 @@
|
|||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_FileOutputStream.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_MemoryMappedFile.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_WildcardFileFilter.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\javascript\juce_Javascript.h"/>
|
||||
|
|
|
|||
|
|
@ -613,6 +613,9 @@
|
|||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.cpp">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.cpp">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.cpp">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClCompile>
|
||||
|
|
@ -2559,6 +2562,9 @@
|
|||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_MemoryMappedFile.h">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.h">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.h">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClInclude>
|
||||
|
|
|
|||
|
|
@ -328,6 +328,9 @@
|
|||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
|
|
@ -1716,6 +1719,7 @@
|
|||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_FileOutputStream.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_MemoryMappedFile.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_WildcardFileFilter.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\javascript\juce_Javascript.h"/>
|
||||
|
|
|
|||
|
|
@ -613,6 +613,9 @@
|
|||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.cpp">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.cpp">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.cpp">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClCompile>
|
||||
|
|
@ -2559,6 +2562,9 @@
|
|||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_MemoryMappedFile.h">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.h">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.h">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClInclude>
|
||||
|
|
|
|||
|
|
@ -638,8 +638,7 @@ Array<File> ProjucerApplication::getSortedExampleDirectories() noexcept
|
|||
if (! isValidJUCEExamplesDirectory (examplesPath))
|
||||
return {};
|
||||
|
||||
DirectoryIterator iter (examplesPath, false, "*", File::findDirectories);
|
||||
while (iter.next())
|
||||
for (const auto& iter : RangedDirectoryIterator (examplesPath, false, "*", File::findDirectories))
|
||||
{
|
||||
auto exampleDirectory = iter.getFile();
|
||||
|
||||
|
|
@ -657,8 +656,7 @@ Array<File> ProjucerApplication::getSortedExampleFilesInDirectory (const File& d
|
|||
{
|
||||
Array<File> exampleFiles;
|
||||
|
||||
DirectoryIterator iter (directory, false, "*.h", File::findFiles);
|
||||
while (iter.next())
|
||||
for (const auto& iter : RangedDirectoryIterator (directory, false, "*.h", File::findFiles))
|
||||
exampleFiles.add (iter.getFile());
|
||||
|
||||
exampleFiles.sort();
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ namespace
|
|||
{
|
||||
Array<File> files;
|
||||
|
||||
for (DirectoryIterator di (folder, true, "*.cpp;*.cxx;*.cc;*.c;*.h;*.hpp;*.hxx;*.hpp;*.mm;*.m;*.java;*.dox;*.soul;*.js", File::findFiles); di.next();)
|
||||
for (const auto& di : RangedDirectoryIterator (folder, true, "*.cpp;*.cxx;*.cc;*.c;*.h;*.hpp;*.hxx;*.hpp;*.mm;*.m;*.java;*.dox;*.soul;*.js", File::findFiles))
|
||||
if (! di.getFile().isSymbolicLink())
|
||||
files.add (di.getFile());
|
||||
|
||||
|
|
@ -263,9 +263,7 @@ namespace
|
|||
ZipFile::Builder zip;
|
||||
|
||||
{
|
||||
DirectoryIterator i (moduleFolder, true, "*", File::findFiles);
|
||||
|
||||
while (i.next())
|
||||
for (const auto& i : RangedDirectoryIterator (moduleFolder, true, "*", File::findFiles))
|
||||
if (! i.getFile().isHidden())
|
||||
zip.addFile (i.getFile(), 9, i.getFile().getRelativePathFrom (moduleFolderParent));
|
||||
}
|
||||
|
|
@ -298,10 +296,9 @@ namespace
|
|||
if (buildAllWithIndex)
|
||||
{
|
||||
auto folderToSearch = args[2].resolveAsFile();
|
||||
DirectoryIterator i (folderToSearch, false, "*", File::findDirectories);
|
||||
var infoList;
|
||||
|
||||
while (i.next())
|
||||
for (const auto& i : RangedDirectoryIterator (folderToSearch, false, "*", File::findDirectories))
|
||||
{
|
||||
LibraryModule module (i.getFile());
|
||||
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ static void addAllModulesInSubfoldersRecursively (const File& path, int depth, A
|
|||
{
|
||||
if (depth > 0)
|
||||
{
|
||||
for (DirectoryIterator iter (path, false, "*", File::findDirectories); iter.next();)
|
||||
for (const auto& iter : RangedDirectoryIterator (path, false, "*", File::findDirectories))
|
||||
{
|
||||
if (auto* job = ThreadPoolJob::getCurrentThreadPoolJob())
|
||||
if (job->shouldExit())
|
||||
|
|
@ -415,11 +415,8 @@ void LibraryModule::findBrowseableFiles (const File& folder, Array<File>& filesF
|
|||
Array<File> tempList;
|
||||
FileSorter sorter;
|
||||
|
||||
DirectoryIterator iter (folder, true, "*", File::findFiles);
|
||||
bool isHiddenFile;
|
||||
|
||||
while (iter.next (nullptr, &isHiddenFile, nullptr, nullptr, nullptr, nullptr))
|
||||
if (! isHiddenFile && iter.getFile().hasFileExtension (browseableFileExtensions))
|
||||
for (const auto& iter : RangedDirectoryIterator (folder, true, "*", File::findFiles))
|
||||
if (! iter.isHidden() && iter.getFile().hasFileExtension (browseableFileExtensions))
|
||||
tempList.addSorted (sorter, iter.getFile());
|
||||
|
||||
filesFound.addArray (tempList);
|
||||
|
|
|
|||
|
|
@ -1502,7 +1502,7 @@ bool Project::Item::addFileAtIndex (const File& file, int insertIndex, const boo
|
|||
{
|
||||
auto group = addNewSubGroup (file.getFileName(), insertIndex);
|
||||
|
||||
for (DirectoryIterator iter (file, false, "*", File::findFilesAndDirectories); iter.next();)
|
||||
for (const auto& iter : RangedDirectoryIterator (file, false, "*", File::findFilesAndDirectories))
|
||||
if (! project.getMainGroup().findItemForFile (iter.getFile()).isValid())
|
||||
group.addFileRetainingSortOrder (iter.getFile(), shouldCompile);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2221,9 +2221,9 @@ private:
|
|||
// Delete .rsrc files in folder but don't follow sym-links
|
||||
void deleteRsrcFiles (const File& folder) const
|
||||
{
|
||||
for (DirectoryIterator di (folder, false, "*", File::findFilesAndDirectories); di.next();)
|
||||
for (const auto& di : RangedDirectoryIterator (folder, false, "*", File::findFilesAndDirectories))
|
||||
{
|
||||
auto& entry = di.getFile();
|
||||
const auto& entry = di.getFile();
|
||||
|
||||
if (! entry.isSymbolicLink())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -262,11 +262,9 @@ private:
|
|||
bool deleteUnwantedFilesIn (const File& parent)
|
||||
{
|
||||
bool folderIsNowEmpty = true;
|
||||
DirectoryIterator i (parent, false, "*", File::findFilesAndDirectories);
|
||||
Array<File> filesToDelete;
|
||||
|
||||
bool isFolder;
|
||||
while (i.next (&isFolder, nullptr, nullptr, nullptr, nullptr, nullptr))
|
||||
for (const auto& i : RangedDirectoryIterator (parent, false, "*", File::findFilesAndDirectories))
|
||||
{
|
||||
auto f = i.getFile();
|
||||
|
||||
|
|
@ -274,7 +272,7 @@ private:
|
|||
{
|
||||
folderIsNowEmpty = false;
|
||||
}
|
||||
else if (isFolder)
|
||||
else if (i.isDirectory())
|
||||
{
|
||||
if (deleteUnwantedFilesIn (f))
|
||||
filesToDelete.add (f);
|
||||
|
|
|
|||
|
|
@ -173,8 +173,7 @@ void StoredSettings::updateOldProjectSettingsFiles()
|
|||
auto newProjectSettingsDir = projucerSettingsDirectory.getChildFile ("ProjectSettings");
|
||||
newProjectSettingsDir.createDirectory();
|
||||
|
||||
DirectoryIterator iter (projucerSettingsDirectory, false, "*.settings");
|
||||
while (iter.next())
|
||||
for (const auto& iter : RangedDirectoryIterator (projucerSettingsDirectory, false, "*.settings"))
|
||||
{
|
||||
auto f = iter.getFile();
|
||||
auto oldFileName = f.getFileName();
|
||||
|
|
|
|||
|
|
@ -24,9 +24,7 @@ namespace FileHelpers
|
|||
{
|
||||
bool containsAnyNonHiddenFiles (const File& folder)
|
||||
{
|
||||
DirectoryIterator di (folder, false);
|
||||
|
||||
while (di.next())
|
||||
for (const auto& di : RangedDirectoryIterator (folder, false))
|
||||
if (! di.getFile().isHidden())
|
||||
return true;
|
||||
|
||||
|
|
|
|||
|
|
@ -161,9 +161,9 @@ struct TranslationHelpers
|
|||
|
||||
static void scanFolderForTranslations (StringArray& strings, const File& root)
|
||||
{
|
||||
for (DirectoryIterator i (root, true); i.next();)
|
||||
for (const auto& i : RangedDirectoryIterator (root, true))
|
||||
{
|
||||
const auto file (i.getFile());
|
||||
const auto file = i.getFile();
|
||||
|
||||
if (file.hasFileExtension (sourceOrHeaderFileExtensions))
|
||||
scanFileForTranslations(strings, file);
|
||||
|
|
|
|||
|
|
@ -782,6 +782,9 @@
|
|||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
|
|
@ -2417,6 +2420,7 @@
|
|||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_FileOutputStream.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_MemoryMappedFile.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_WildcardFileFilter.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\javascript\juce_Javascript.h"/>
|
||||
|
|
|
|||
|
|
@ -1165,6 +1165,9 @@
|
|||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.cpp">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.cpp">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.cpp">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClCompile>
|
||||
|
|
@ -3558,6 +3561,9 @@
|
|||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_MemoryMappedFile.h">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.h">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.h">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClInclude>
|
||||
|
|
|
|||
|
|
@ -782,6 +782,9 @@
|
|||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
|
|
@ -2417,6 +2420,7 @@
|
|||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_FileOutputStream.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_MemoryMappedFile.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_WildcardFileFilter.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\javascript\juce_Javascript.h"/>
|
||||
|
|
|
|||
|
|
@ -1165,6 +1165,9 @@
|
|||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.cpp">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.cpp">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.cpp">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClCompile>
|
||||
|
|
@ -3558,6 +3561,9 @@
|
|||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_MemoryMappedFile.h">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.h">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.h">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClInclude>
|
||||
|
|
|
|||
|
|
@ -711,6 +711,9 @@
|
|||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
|
|
@ -2197,6 +2200,7 @@
|
|||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_FileOutputStream.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_MemoryMappedFile.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_WildcardFileFilter.h"/>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\javascript\juce_Javascript.h"/>
|
||||
|
|
|
|||
|
|
@ -1021,6 +1021,9 @@
|
|||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.cpp">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.cpp">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.cpp">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClCompile>
|
||||
|
|
@ -3189,6 +3192,9 @@
|
|||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_MemoryMappedFile.h">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_RangedDirectoryIterator.h">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.h">
|
||||
<Filter>JUCE Modules\juce_core\files</Filter>
|
||||
</ClInclude>
|
||||
|
|
|
|||
|
|
@ -683,9 +683,8 @@ StringArray LADSPAPluginFormat::searchPathsForPlugins (const FileSearchPath& dir
|
|||
|
||||
void LADSPAPluginFormat::recursiveFileSearch (StringArray& results, const File& dir, const bool recursive)
|
||||
{
|
||||
DirectoryIterator iter (dir, false, "*", File::findFilesAndDirectories);
|
||||
|
||||
while (iter.next())
|
||||
for (const auto& iter : RangedDirectoryIterator (dir, false, "*", File::findFilesAndDirectories))
|
||||
{
|
||||
auto f = iter.getFile();
|
||||
bool isPlugin = false;
|
||||
|
|
|
|||
|
|
@ -3175,9 +3175,7 @@ StringArray VST3PluginFormat::searchPathsForPlugins (const FileSearchPath& direc
|
|||
|
||||
void VST3PluginFormat::recursiveFileSearch (StringArray& results, const File& directory, const bool recursive)
|
||||
{
|
||||
DirectoryIterator iter (directory, false, "*", File::findFilesAndDirectories);
|
||||
|
||||
while (iter.next())
|
||||
for (const auto& iter : RangedDirectoryIterator (directory, false, "*", File::findFilesAndDirectories))
|
||||
{
|
||||
auto f = iter.getFile();
|
||||
bool isPlugin = false;
|
||||
|
|
|
|||
|
|
@ -3605,9 +3605,7 @@ void VSTPluginFormat::recursiveFileSearch (StringArray& results, const File& dir
|
|||
{
|
||||
// avoid allowing the dir iterator to be recursive, because we want to avoid letting it delve inside
|
||||
// .component or .vst directories.
|
||||
DirectoryIterator iter (dir, false, "*", File::findFilesAndDirectories);
|
||||
|
||||
while (iter.next())
|
||||
for (const auto& iter : RangedDirectoryIterator (dir, false, "*", File::findFilesAndDirectories))
|
||||
{
|
||||
auto f = iter.getFile();
|
||||
bool isPlugin = false;
|
||||
|
|
|
|||
|
|
@ -64,6 +64,9 @@ bool DirectoryIterator::next()
|
|||
return next (nullptr, nullptr, nullptr, nullptr, nullptr, nullptr);
|
||||
}
|
||||
|
||||
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations")
|
||||
JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4996)
|
||||
|
||||
bool DirectoryIterator::next (bool* isDirResult, bool* isHiddenResult, int64* fileSize,
|
||||
Time* modTime, Time* creationTime, bool* isReadOnly)
|
||||
{
|
||||
|
|
@ -134,6 +137,9 @@ bool DirectoryIterator::next (bool* isDirResult, bool* isHiddenResult, int64* fi
|
|||
}
|
||||
}
|
||||
|
||||
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
|
||||
JUCE_END_IGNORE_WARNINGS_MSVC
|
||||
|
||||
const File& DirectoryIterator::getFile() const
|
||||
{
|
||||
if (subIterator != nullptr && subIterator->hasBeenAdvanced)
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@ namespace juce
|
|||
|
||||
//==============================================================================
|
||||
/**
|
||||
This class is now deprecated in favour of RangedDirectoryIterator.
|
||||
|
||||
Searches through the files in a directory, returning each file that is found.
|
||||
|
||||
A DirectoryIterator will search through a directory and its subdirectories using
|
||||
|
|
@ -42,12 +44,15 @@ namespace juce
|
|||
It also provides an estimate of its progress, using a (highly inaccurate!) algorithm.
|
||||
|
||||
@tags{Core}
|
||||
@see RangedDirectoryIterator
|
||||
*/
|
||||
class JUCE_API DirectoryIterator final
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
/** Creates a DirectoryIterator for a given directory.
|
||||
/** This class is now deprecated in favour of RangedDirectoryIterator.
|
||||
|
||||
Creates a DirectoryIterator for a given directory.
|
||||
|
||||
After creating one of these, call its next() method to get the
|
||||
first file - e.g. @code
|
||||
|
|
@ -68,11 +73,12 @@ public:
|
|||
separated by a semi-colon or comma, e.g. "*.jpg;*.png"
|
||||
@param whatToLookFor a value from the File::TypesOfFileToFind enum, specifying
|
||||
whether to look for files, directories, or both.
|
||||
@see RangedDirectoryIterator
|
||||
*/
|
||||
DirectoryIterator (const File& directory,
|
||||
bool isRecursive,
|
||||
const String& wildCard = "*",
|
||||
int whatToLookFor = File::findFiles);
|
||||
JUCE_DEPRECATED (DirectoryIterator (const File& directory,
|
||||
bool isRecursive,
|
||||
const String& wildCard = "*",
|
||||
int whatToLookFor = File::findFiles));
|
||||
|
||||
/** Destructor. */
|
||||
~DirectoryIterator();
|
||||
|
|
|
|||
|
|
@ -574,7 +574,7 @@ int File::findChildFiles (Array<File>& results, int whatToLookFor, bool searchRe
|
|||
{
|
||||
int total = 0;
|
||||
|
||||
for (DirectoryIterator di (*this, searchRecursively, wildcard, whatToLookFor); di.next();)
|
||||
for (const auto& di : RangedDirectoryIterator (*this, searchRecursively, wildcard, whatToLookFor))
|
||||
{
|
||||
results.add (di.getFile());
|
||||
++total;
|
||||
|
|
@ -585,12 +585,10 @@ int File::findChildFiles (Array<File>& results, int whatToLookFor, bool searchRe
|
|||
|
||||
int File::getNumberOfChildFiles (const int whatToLookFor, const String& wildCardPattern) const
|
||||
{
|
||||
int total = 0;
|
||||
|
||||
for (DirectoryIterator di (*this, false, wildCardPattern, whatToLookFor); di.next();)
|
||||
++total;
|
||||
|
||||
return total;
|
||||
return std::accumulate (RangedDirectoryIterator (*this, false, wildCardPattern, whatToLookFor),
|
||||
RangedDirectoryIterator(),
|
||||
0,
|
||||
[] (int acc, const DirectoryEntry&) { return acc + 1; });
|
||||
}
|
||||
|
||||
bool File::containsSubDirectories() const
|
||||
|
|
@ -598,8 +596,7 @@ bool File::containsSubDirectories() const
|
|||
if (! isDirectory())
|
||||
return false;
|
||||
|
||||
DirectoryIterator di (*this, false, "*", findDirectories);
|
||||
return di.next();
|
||||
return RangedDirectoryIterator (*this, false, "*", findDirectories) != RangedDirectoryIterator();
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -574,7 +574,7 @@ public:
|
|||
@param wildCardPattern the filename pattern to search for, e.g. "*.txt"
|
||||
@returns the set of files that were found
|
||||
|
||||
@see getNumberOfChildFiles, DirectoryIterator
|
||||
@see getNumberOfChildFiles, RangedDirectoryIterator
|
||||
*/
|
||||
Array<File> findChildFiles (int whatToLookFor,
|
||||
bool searchRecursively,
|
||||
|
|
@ -602,7 +602,8 @@ public:
|
|||
is also added to this value, hidden files won't be counted
|
||||
@param wildCardPattern the filename pattern to search for, e.g. "*.txt"
|
||||
@returns the number of matches found
|
||||
@see findChildFiles, DirectoryIterator
|
||||
|
||||
@see findChildFiles, RangedDirectoryIterator
|
||||
*/
|
||||
int getNumberOfChildFiles (int whatToLookFor,
|
||||
const String& wildCardPattern = "*") const;
|
||||
|
|
|
|||
68
modules/juce_core/files/juce_RangedDirectoryIterator.cpp
Normal file
68
modules/juce_core/files/juce_RangedDirectoryIterator.cpp
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
/*
|
||||
==============================================================================
|
||||
|
||||
This file is part of the JUCE library.
|
||||
Copyright (c) 2017 - ROLI Ltd.
|
||||
|
||||
JUCE is an open source library subject to commercial or open-source
|
||||
licensing.
|
||||
|
||||
The code included in this file is provided under the terms of the ISC license
|
||||
http://www.isc.org/downloads/software-support-policy/isc-license. Permission
|
||||
To use, copy, modify, and/or distribute this software for any purpose with or
|
||||
without fee is hereby granted provided that the above copyright notice and
|
||||
this permission notice appear in all copies.
|
||||
|
||||
JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
|
||||
EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
|
||||
DISCLAIMED.
|
||||
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
namespace juce
|
||||
{
|
||||
|
||||
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations")
|
||||
JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4996)
|
||||
|
||||
// We implement this in terms of the deprecated DirectoryIterator,
|
||||
// but the old DirectoryIterator might go away in the future!
|
||||
RangedDirectoryIterator::RangedDirectoryIterator (const File& directory,
|
||||
bool isRecursive,
|
||||
const String& wildCard,
|
||||
int whatToLookFor)
|
||||
: iterator (new DirectoryIterator (directory,
|
||||
isRecursive,
|
||||
wildCard,
|
||||
whatToLookFor))
|
||||
{
|
||||
increment();
|
||||
}
|
||||
|
||||
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
|
||||
JUCE_END_IGNORE_WARNINGS_MSVC
|
||||
|
||||
bool RangedDirectoryIterator::next()
|
||||
{
|
||||
const auto result = iterator->next (&entry.directory,
|
||||
&entry.hidden,
|
||||
&entry.fileSize,
|
||||
&entry.modTime,
|
||||
&entry.creationTime,
|
||||
&entry.readOnly);
|
||||
if (result)
|
||||
entry.file = iterator->getFile();
|
||||
else
|
||||
entry = {};
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
void RangedDirectoryIterator::increment()
|
||||
{
|
||||
if (iterator != nullptr && ! next())
|
||||
iterator = nullptr;
|
||||
}
|
||||
|
||||
} // namespace juce
|
||||
169
modules/juce_core/files/juce_RangedDirectoryIterator.h
Normal file
169
modules/juce_core/files/juce_RangedDirectoryIterator.h
Normal file
|
|
@ -0,0 +1,169 @@
|
|||
/*
|
||||
==============================================================================
|
||||
|
||||
This file is part of the JUCE library.
|
||||
Copyright (c) 2017 - ROLI Ltd.
|
||||
|
||||
JUCE is an open source library subject to commercial or open-source
|
||||
licensing.
|
||||
|
||||
The code included in this file is provided under the terms of the ISC license
|
||||
http://www.isc.org/downloads/software-support-policy/isc-license. Permission
|
||||
To use, copy, modify, and/or distribute this software for any purpose with or
|
||||
without fee is hereby granted provided that the above copyright notice and
|
||||
this permission notice appear in all copies.
|
||||
|
||||
JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
|
||||
EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
|
||||
DISCLAIMED.
|
||||
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
namespace juce
|
||||
{
|
||||
|
||||
//==============================================================================
|
||||
/** Describes the attributes of a file or folder. */
|
||||
class DirectoryEntry final
|
||||
{
|
||||
public:
|
||||
/** The path to a file or folder. */
|
||||
File getFile() const { return file; }
|
||||
|
||||
/** The time at which the item was last modified. */
|
||||
Time getModificationTime() const { return modTime; }
|
||||
|
||||
/** The time at which the item was created. */
|
||||
Time getCreationTime() const { return creationTime; }
|
||||
|
||||
/** The size of the item. */
|
||||
int64 getFileSize() const { return fileSize; }
|
||||
|
||||
/** True if the item is a directory, false otherwise. */
|
||||
bool isDirectory() const { return directory; }
|
||||
|
||||
/** True if the item is hidden, false otherwise. */
|
||||
bool isHidden() const { return hidden; }
|
||||
|
||||
/** True if the item is read-only, false otherwise. */
|
||||
bool isReadOnly() const { return readOnly; }
|
||||
|
||||
private:
|
||||
File file;
|
||||
Time modTime;
|
||||
Time creationTime;
|
||||
int64 fileSize = 0;
|
||||
bool directory = false;
|
||||
bool hidden = false;
|
||||
bool readOnly = false;
|
||||
|
||||
friend class RangedDirectoryIterator;
|
||||
};
|
||||
|
||||
/** A convenience operator so that the expression `*it++` works correctly when
|
||||
`it` is an instance of RangedDirectoryIterator.
|
||||
*/
|
||||
inline const DirectoryEntry& operator* (const DirectoryEntry& e) noexcept { return e; }
|
||||
|
||||
//==============================================================================
|
||||
/**
|
||||
Allows iterating over files and folders using C++11 range-for syntax.
|
||||
|
||||
In the following example, we recursively find all hidden files in a
|
||||
specific directory.
|
||||
|
||||
@code
|
||||
std::vector<File> hiddenFiles;
|
||||
|
||||
for (DirectoryEntry entry : RangedDirectoryIterator (File ("/path/to/folder"), isRecursive))
|
||||
if (entry.isHidden())
|
||||
hiddenFiles.push_back (entry.getFile());
|
||||
@endcode
|
||||
*/
|
||||
class RangedDirectoryIterator final
|
||||
{
|
||||
public:
|
||||
using difference_type = std::ptrdiff_t;
|
||||
using value_type = DirectoryEntry;
|
||||
using reference = DirectoryEntry;
|
||||
using pointer = void;
|
||||
using iterator_category = std::input_iterator_tag;
|
||||
|
||||
/** The default-constructed iterator acts as the 'end' sentinel. */
|
||||
RangedDirectoryIterator() = default;
|
||||
|
||||
/** Creates a RangedDirectoryIterator for a given directory.
|
||||
|
||||
The resulting iterator can be used directly in a 'range-for' expression.
|
||||
|
||||
@param directory the directory to search in
|
||||
@param isRecursive whether all the subdirectories should also be searched
|
||||
@param wildCard the file pattern to match. This may contain multiple patterns
|
||||
separated by a semi-colon or comma, e.g. "*.jpg;*.png"
|
||||
@param whatToLookFor a value from the File::TypesOfFileToFind enum, specifying
|
||||
whether to look for files, directories, or both.
|
||||
*/
|
||||
RangedDirectoryIterator (const File& directory,
|
||||
bool isRecursive,
|
||||
const String& wildCard = "*",
|
||||
int whatToLookFor = File::findFiles);
|
||||
|
||||
/** Returns true if both iterators are in their end/sentinel state,
|
||||
otherwise returns false.
|
||||
*/
|
||||
bool operator== (const RangedDirectoryIterator& other) const noexcept
|
||||
{
|
||||
return iterator == nullptr && other.iterator == nullptr;
|
||||
}
|
||||
|
||||
/** Returns the inverse of operator== */
|
||||
bool operator!= (const RangedDirectoryIterator& other) const noexcept
|
||||
{
|
||||
return ! operator== (other);
|
||||
}
|
||||
|
||||
/** Return an object containing metadata about the file or folder to
|
||||
which the iterator is currently pointing.
|
||||
*/
|
||||
const DirectoryEntry& operator* () const noexcept { return entry; }
|
||||
const DirectoryEntry* operator->() const noexcept { return &entry; }
|
||||
|
||||
/** Moves the iterator along to the next file. */
|
||||
RangedDirectoryIterator& operator++()
|
||||
{
|
||||
increment();
|
||||
return *this;
|
||||
}
|
||||
|
||||
/** Moves the iterator along to the next file.
|
||||
|
||||
@returns an object containing metadata about the file or folder to
|
||||
to which the iterator was previously pointing.
|
||||
*/
|
||||
DirectoryEntry operator++ (int)
|
||||
{
|
||||
auto result = *(*this);
|
||||
++(*this);
|
||||
return result;
|
||||
}
|
||||
|
||||
private:
|
||||
bool next();
|
||||
void increment();
|
||||
|
||||
std::shared_ptr<DirectoryIterator> iterator;
|
||||
DirectoryEntry entry;
|
||||
};
|
||||
|
||||
/** Returns the iterator that was passed in.
|
||||
Provided for range-for compatibility.
|
||||
*/
|
||||
inline RangedDirectoryIterator begin (const RangedDirectoryIterator& it) { return it; }
|
||||
|
||||
/** Returns a default-constructed sentinel value.
|
||||
Provided for range-for compatibility.
|
||||
*/
|
||||
inline RangedDirectoryIterator end (const RangedDirectoryIterator&) { return {}; }
|
||||
|
||||
} // namespace juce
|
||||
|
|
@ -124,6 +124,7 @@
|
|||
#include "containers/juce_ReferenceCountedArray.cpp"
|
||||
#include "containers/juce_SparseSet.cpp"
|
||||
#include "files/juce_DirectoryIterator.cpp"
|
||||
#include "files/juce_RangedDirectoryIterator.cpp"
|
||||
#include "files/juce_File.cpp"
|
||||
#include "files/juce_FileInputStream.cpp"
|
||||
#include "files/juce_FileOutputStream.cpp"
|
||||
|
|
|
|||
|
|
@ -283,6 +283,7 @@ JUCE_END_IGNORE_WARNINGS_MSVC
|
|||
#include "streams/juce_InputSource.h"
|
||||
#include "files/juce_File.h"
|
||||
#include "files/juce_DirectoryIterator.h"
|
||||
#include "files/juce_RangedDirectoryIterator.h"
|
||||
#include "files/juce_FileInputStream.h"
|
||||
#include "files/juce_FileOutputStream.h"
|
||||
#include "files/juce_FileSearchPath.h"
|
||||
|
|
|
|||
|
|
@ -319,9 +319,8 @@ private:
|
|||
return {};
|
||||
|
||||
auto rootFsDevice = info.st_dev;
|
||||
DirectoryIterator iter (mountFolder, false, "*", File::findDirectories);
|
||||
|
||||
while (iter.next())
|
||||
for (const auto& iter : RangedDirectoryIterator (mountFolder, false, "*", File::findDirectories))
|
||||
{
|
||||
auto candidate = iter.getFile();
|
||||
|
||||
|
|
|
|||
|
|
@ -43,22 +43,24 @@
|
|||
|
||||
|
||||
//==============================================================================
|
||||
#include <memory>
|
||||
#include <cmath>
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
#include <functional>
|
||||
#include <algorithm>
|
||||
#include <limits>
|
||||
#include <atomic>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
#include <map>
|
||||
#include <cstddef>
|
||||
#include <unordered_set>
|
||||
#include <mutex>
|
||||
#include <cmath>
|
||||
#include <condition_variable>
|
||||
#include <cstddef>
|
||||
#include <functional>
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
#include <limits>
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <numeric>
|
||||
#include <queue>
|
||||
#include <sstream>
|
||||
#include <unordered_set>
|
||||
#include <vector>
|
||||
|
||||
//==============================================================================
|
||||
#include "juce_CompilerSupport.h"
|
||||
|
|
|
|||
|
|
@ -190,9 +190,7 @@ public:
|
|||
{
|
||||
for (auto& path : paths)
|
||||
{
|
||||
DirectoryIterator iter (File::getCurrentWorkingDirectory().getChildFile (path), true);
|
||||
|
||||
while (iter.next())
|
||||
for (const auto iter : RangedDirectoryIterator (File::getCurrentWorkingDirectory().getChildFile (path), true))
|
||||
if (iter.getFile().hasFileExtension ("ttf;pfb;pcf;otf"))
|
||||
scanFont (iter.getFile());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,14 +81,14 @@ void DirectoryContentsList::stopSearching()
|
|||
{
|
||||
shouldStop = true;
|
||||
thread.removeTimeSliceClient (this);
|
||||
fileFindHandle.reset();
|
||||
fileFindHandle = nullptr;
|
||||
}
|
||||
|
||||
void DirectoryContentsList::clear()
|
||||
{
|
||||
stopSearching();
|
||||
|
||||
if (files.size() > 0)
|
||||
if (! files.isEmpty())
|
||||
{
|
||||
files.clear();
|
||||
changed();
|
||||
|
|
@ -103,7 +103,7 @@ void DirectoryContentsList::refresh()
|
|||
|
||||
if (root.isDirectory())
|
||||
{
|
||||
fileFindHandle.reset (new DirectoryIterator (root, false, "*", fileTypeFlags));
|
||||
fileFindHandle = std::make_unique<RangedDirectoryIterator> (root, false, "*", fileTypeFlags);
|
||||
shouldStop = false;
|
||||
thread.addTimeSliceClient (this);
|
||||
}
|
||||
|
|
@ -196,15 +196,16 @@ bool DirectoryContentsList::checkNextFile (bool& hasChanged)
|
|||
{
|
||||
if (fileFindHandle != nullptr)
|
||||
{
|
||||
bool fileFoundIsDir, isHidden, isReadOnly;
|
||||
int64 fileSize;
|
||||
Time modTime, creationTime;
|
||||
|
||||
if (fileFindHandle->next (&fileFoundIsDir, &isHidden, &fileSize,
|
||||
&modTime, &creationTime, &isReadOnly))
|
||||
if (*fileFindHandle != RangedDirectoryIterator())
|
||||
{
|
||||
if (addFile (fileFindHandle->getFile(), fileFoundIsDir,
|
||||
fileSize, modTime, creationTime, isReadOnly))
|
||||
const auto entry = *(*fileFindHandle)++;
|
||||
|
||||
if (addFile (entry.getFile(),
|
||||
entry.isDirectory(),
|
||||
entry.getFileSize(),
|
||||
entry.getModificationTime(),
|
||||
entry.getCreationTime(),
|
||||
entry.isReadOnly()))
|
||||
{
|
||||
hasChanged = true;
|
||||
}
|
||||
|
|
@ -212,7 +213,7 @@ bool DirectoryContentsList::checkNextFile (bool& hasChanged)
|
|||
return true;
|
||||
}
|
||||
|
||||
fileFindHandle.reset();
|
||||
fileFindHandle = nullptr;
|
||||
|
||||
if (! wasEmpty && files.isEmpty())
|
||||
hasChanged = true;
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ private:
|
|||
CriticalSection fileListLock;
|
||||
OwnedArray<FileInfo> files;
|
||||
|
||||
std::unique_ptr<DirectoryIterator> fileFindHandle;
|
||||
std::unique_ptr<RangedDirectoryIterator> fileFindHandle;
|
||||
std::atomic<bool> shouldStop { true };
|
||||
|
||||
bool wasEmpty = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue