sees_all1 Posted October 7, 2011 Share Posted October 7, 2011 Anyone know the difference between the two? Also, if I wanted to make an exact copy of a file, would File.getTotalSpace() necessarily have to be the same between the copies, especially between different operating systems? 99 dungeoneering achieved, thanks to everyone that celebrated with me! ♪♪ Don't interrupt me as I struggle to complete this thoughtHave some respect for someone more forgetful than yourself ♪♪♪♪ And I'm not doneAnd I won't be till my head falls off ♪♪ Link to comment Share on other sites More sharing options...
Corvus Posted October 7, 2011 Share Posted October 7, 2011 [spoiler=length]lengthpublic long length()Returns the length of the file denoted by this abstract pathname. The return value is unspecified if this pathname denotes a directory. Returns:The length, in bytes, of the file denoted by this abstract pathname, or 0L if the file does not exist. Some operating systems may return 0L for pathnames denoting system-dependent entities such as devices or pipes. [spoiler=getTotalSpace]getTotalSpacepublic long getTotalSpace()Returns the size of the partition named by this abstract pathname. Returns:The size, in bytes, of the partition or 0L if this abstract pathname does not name a partition You Probably want to use length because from what I can tell getTotalSpace is for checking information on Drives (and possibly folders) Contained disk space. Thanks to DrCue at DeviantArt for the signature source Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now