How can I get the size of a file or directory using the new NIO in java 7?
Use Files.size(Path)
to get the size of a file.
For the size of a directory (meaning the size of all files contained in it), you still need to recurse manually, as far as I know.