コード例 #1
0
 /// <summary>
 /// Gets the directory statistics: total files, folders and bytes
 /// </summary>
 /// <param name="directoryInfo"></param>
 /// <returns>A <see cref="QuickIOFolderStatisticResult"/> object that holds the folder statistics such as number of folders, files and total bytes</returns>
 /// <example>
 /// This example shows how to call <see>
 ///         <cref>GetStatistics</cref>
 ///     </see>
 ///     with <see cref="QuickIODirectoryInfo"/> and write the result to the console.
 /// <code>
 ///public static void GetStatistics_With_DirectoryInfo_Example()
 ///{
 ///    QuickIODirectoryInfo targetDirectoryPathInfo = new QuickIODirectoryInfo( @"C:\temp\QuickIOTest" );
 ///
 ///    // Get statistics
 ///    QuickIOFolderStatisticResult stats = QuickIODirectory.GetStatistics( targetDirectoryPathInfo );
 ///
 ///    // Output
 ///    Console.WriteLine( "[Stats] Folders: '{0}' Files: '{1}' Total TotalBytes '{2}'", stats.FolderCount, stats.FileCount, stats.TotalBytes );
 ///}
 /// </code>
 /// </example>
 public static QuickIOFolderStatisticResult GetStatistics(QuickIODirectoryInfo directoryInfo)
 {
     return(InternalQuickIO.GetDirectoryStatistics(directoryInfo.PathInfo));
 }