123456789101112131415 |
- using System.IO;
- namespace DiskAccessLibrary
- {
- public static class IoUtility
- {
- public static long GetRealFileSize(string path)
- {
- using (var fs = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
- {
- return fs.Length;
- }
- }
- }
- }
|