[英]How to check logical and physical file size on disk using C# file API
How to read the logical and physical file size using C# api. 如何使用C#api读取逻辑和物理文件大小。
(new FileInfo(path).Length)
is the actual size. 是实际大小。 As for size on disk, I don't think there's an API to get it, but you can get it using the actual size, and the cluster size.
至于磁盘上的大小,我认为没有一个API可以获得它,但你可以使用实际大小和群集大小来获取它。
There's some info on the calculation required here: http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/85bf76ac-a254-41d4-a3d7-e7803c8d9bc3 这里需要计算一些信息: http : //social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/85bf76ac-a254-41d4-a3d7-e7803c8d9bc3
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.