[英]How do you get the file on disk, and not just the file size in Java?
我需要磁盤上的文件大小而不是文件大小。
File myFile = new File ("C:\\Send\\Capture.png");
System.out.println((int)myFile.length());
此代碼給出了文件大小。 我需要磁盤上的文件大小。 它們總是碰巧不同,如下圖所示,對吧?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.