Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个目录,里面有很多子文件夹。如何使用 java 确定其中存在的每个子文件夹和文件的大小?
使用FileUtils.sizeOfDirectory(File f)commons.io库中的方法。
FileUtils.sizeOfDirectory(File f)