mrpdaemon / encfs-java

encfs-java is a Java library for accessing data in EncFS volumes
GNU Lesser General Public License v3.0
42 stars 15 forks source link

EncFSFile to provide method to get the unencrypted / output file size #4

Closed aefo closed 12 years ago

aefo commented 12 years ago

Doing encFsFile.getFile().length() does not return the same size as doing decodedFsFile.length() (as there are the encfs headers stored in the encrypted file). Therefore we should provide a method on EncFsFile to calculate / get the decrypted output file size.

(Other attributes like isDirectory / lastModified are correct / match)

aefo commented 12 years ago

On looking at this further, it seems to match up for files (comparing mounted encfs volume to encfs-java) except for directories. Those seem to come out with a size of 4096 (the block size), but can can be easily checked / ignored.

Closing this issue for the moment