MCPcopy Create free account
hub / github.com/boostorg/build / glob1

Function glob1

v2/engine/builtins.c:762–788  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

760
761
762LIST * glob1( OBJECT * dirname, OBJECT * pattern )
763{
764 LIST * const plist = list_new( object_copy( pattern ) );
765 struct globbing globbing;
766
767 globbing.results = L0;
768 globbing.patterns = plist;
769
770 globbing.case_insensitive
771# if defined( OS_NT ) || defined( OS_CYGWIN )
772 = plist; /* always case-insensitive if any files can be found */
773# else
774 = L0;
775# endif
776
777 if ( globbing.case_insensitive )
778 globbing.patterns = downcase_list( plist );
779
780 file_dirscan( dirname, builtin_glob_back, &globbing );
781
782 if ( globbing.case_insensitive )
783 list_free( globbing.patterns );
784
785 list_free( plist );
786
787 return globbing.results;
788}
789
790
791LIST * glob_recursive( char const * pattern )

Callers 1

glob_recursiveFunction · 0.85

Calls 5

list_newFunction · 0.85
object_copyFunction · 0.85
downcase_listFunction · 0.85
file_dirscanFunction · 0.85
list_freeFunction · 0.85

Tested by

no test coverage detected