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

Function glob1

src/engine/builtins.c:805–831  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

803
804
805LIST * glob1( OBJECT * dirname, OBJECT * pattern )
806{
807 LIST * const plist = list_new( object_copy( pattern ) );
808 struct globbing globbing;
809
810 globbing.results = L0;
811 globbing.patterns = plist;
812
813 globbing.case_insensitive
814# if defined( OS_NT ) || defined( OS_CYGWIN ) || defined( OS_VMS )
815 = plist; /* always case-insensitive if any files can be found */
816# else
817 = L0;
818# endif
819
820 if ( globbing.case_insensitive )
821 globbing.patterns = downcase_list( plist );
822
823 file_dirscan( dirname, builtin_glob_back, &globbing );
824
825 if ( globbing.case_insensitive )
826 list_free( globbing.patterns );
827
828 list_free( plist );
829
830 return globbing.results;
831}
832
833
834LIST * 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