Changeset 2514 in ProjectBuilder
- Timestamp:
- Apr 2, 2020, 2:44:50 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb-modules/lib/ProjectBuilder/Base.pm
r2498 r2514 40 40 41 41 our @ISA = qw(Exporter); 42 our @EXPORT = qw(pb_mkdir_p pb_system pb_rm_rf pb_get_date pb_log pb_log_init pb_get_uri pb_get_content pb_set_content pb_display_file pb_syntax_init pb_syntax pb_temp_init pb_get_arch pb_get_osrelease pb_check_requirements pb_check_req pb_path_expand pb_ exit $pbdebug $pbLOG $pbdisplaytype $pblocale);42 our @EXPORT = qw(pb_mkdir_p pb_system pb_rm_rf pb_get_date pb_log pb_log_init pb_get_uri pb_get_content pb_set_content pb_display_file pb_syntax_init pb_syntax pb_temp_init pb_get_arch pb_get_osrelease pb_check_requirements pb_check_req pb_path_expand pb_path_nbfiles pb_exit $pbdebug $pbLOG $pbdisplaytype $pblocale); 43 43 44 44 =pod … … 593 593 } 594 594 595 =item B<pb_path_nbfiles> 596 597 Return the number of files in a directory 598 599 =cut 600 601 sub pb_path_nbfiles { 602 603 my $path = shift; 604 my $nb = 0; 605 606 opendir(DIR,$path) || confess "Unable to open directory $path: $!"; 607 foreach my $f (readdir(DIR)) { 608 next if ($f =~ /^\.[\.]*$/); 609 $nb++; 610 } 611 closedir(DIR); 612 613 return($nb); 614 } 615 595 616 =back 596 617
Note:
See TracChangeset
for help on using the changeset viewer.