A
Amy L.
I am working on some code that will be used in a Windows Service that will
monitor specific files in a queue.
I would like to get an integer value of the amount of specfic files in a
directory. Now I have been using this code to get what I need.
private DirectoryInfo di ;
di = new DirectoryInfo( @"c:\temp" ) ;
int files_in_directory_value = di.GetFileSystemInfos( "*.abc" ).Length ;
Now the issue I beleive that I will face is that the directory I will be
checking at times can have 40K+ files that match the search string. Seeing
that GetFileSystemInfos returns an array of all the files that I am
searching on I am concerned about potential memory usage of this structure
and just general decrease in performance. I am sure everyone would agree
that just getting the integer value would be better.
Any thoughts on other framework functions to get this info?.
Amy
monitor specific files in a queue.
I would like to get an integer value of the amount of specfic files in a
directory. Now I have been using this code to get what I need.
private DirectoryInfo di ;
di = new DirectoryInfo( @"c:\temp" ) ;
int files_in_directory_value = di.GetFileSystemInfos( "*.abc" ).Length ;
Now the issue I beleive that I will face is that the directory I will be
checking at times can have 40K+ files that match the search string. Seeing
that GetFileSystemInfos returns an array of all the files that I am
searching on I am concerned about potential memory usage of this structure
and just general decrease in performance. I am sure everyone would agree
that just getting the integer value would be better.
Any thoughts on other framework functions to get this info?.
Amy