MCPcopy Create free account
hub / github.com/SpartanJ/eepp / openAllFilesInFolder

Method openAllFilesInFolder

src/tools/ecode/ecode.cpp:3581–3606  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3579}
3580
3581void App::openAllFilesInFolder( const FileInfo& folder ) {
3582 auto files =
3583 FileSystem::filesInfoGetInPath( folder.getDirectoryPath(), true, false, true,
3584 getFileSystemModel()->getDisplayConfig().ignoreHidden );
3585
3586 std::vector<std::string> supportedExts(
3587 SyntaxDefinitionManager::instance()->getExtensionsPatternsSupported() );
3588 std::vector<LuaPatternStorage> acceptedPatterns;
3589 acceptedPatterns.reserve( supportedExts.size() );
3590 for ( const auto& strPattern : supportedExts )
3591 acceptedPatterns.emplace_back( std::string{ strPattern } );
3592
3593 for ( const auto& file : files ) {
3594 if ( file.isRegularFile() ) {
3595 bool foundPattern = acceptedPatterns.empty();
3596 for ( auto& pattern : acceptedPatterns ) {
3597 if ( pattern.matches( file.getFilepath() ) ) {
3598 foundPattern = true;
3599 break;
3600 }
3601 }
3602 if ( foundPattern )
3603 loadFileFromPath( file.getFilepath() );
3604 }
3605 }
3606}
3607
3608void App::toggleHiddenFiles() {
3609 mFileSystemModel = FileSystemModel::New( mFileSystemModel->getRootPath(),

Callers 1

createProjectTreeMenuMethod · 0.80

Calls 7

getDirectoryPathMethod · 0.80
reserveMethod · 0.80
isRegularFileMethod · 0.80
sizeMethod · 0.45
emptyMethod · 0.45
matchesMethod · 0.45

Tested by

no test coverage detected