aspose file tools*
The moose likes I/O and Streams and the fly likes FileStore Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "FileStore" Watch "FileStore" New topic
Author

FileStore

meeta gaur
Ranch Hand

Joined: Dec 05, 2012
Posts: 305


Total space = 20 Gb
Unallocated space = 5 Gb
Used space = 15 Gb
Free space = 5 Gb

if it is then my volume should be 25 gb capacity, total=used+free+unallocated

I don't think there is any unallocated space on my volume D then what is it showing ?


[Thumbnail for untitled.JPG]



My one regret in life is that I am not someone else.
- Woody Allen
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42608
    
  65
Perhaps this: "total=used+free+unallocated" is not correct, because usable/free space and unallocated space are not mutually exlcusive.


Ping & DNS - my free Android networking tools app
meeta gaur
Ranch Hand

Joined: Dec 05, 2012
Posts: 305

Ulf Dittmer wrote:Perhaps this: "total=used+free+unallocated" is not correct, because usable/free space and unallocated space are not mutually exlcusive.


I'm not getting your point, please explain little bit more. thanks
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42608
    
  65
My point is that your assumption that "total=used+free+unallocated" may be incorrect. The javadocs do a bad job of explaining what the difference between "unused" and "unallocated" disk space might be; it's certainly not clear to me (and, I suspect, might vary between different file systems),
Tony Docherty
Bartender

Joined: Aug 07, 2007
Posts: 2366
    
  50
The API docs state the returned values are a hint and not a guarantee.

As Ulf has said the docs are not clear on what exactly these terms relate to but unallocated space on a physical hard drive is space which hasn't been allocated to a volume yet and if this is what getUnallocatedSpace() is returning then that is why it doesn't show up on the windows file properties dialog.
meeta gaur
Ranch Hand

Joined: Dec 05, 2012
Posts: 305

Thank you very much guys.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: FileStore