physical size vs size

hi there, I’m wondering what the difference is between physical size and size.

my code:

tell application "Finder"
	set x to alias "Macintosh HD:Users:admin:Documents:"
	get size of folder x
	set y to result
end tell

I used “get physical size of folder x” and it gave me the wrong folder size…when I use “get size of folder x” it reports back with the proper folder size.

Physical Size = actual size on HD.
Size = logical size on HD = the number of bytes in a memory block’s contents.

They’re about the same, think of a harddisk divided in millions of blocks, each containing 512 bytes (maybe kbytes, I don’t know for sure). “Physical size” is how many bytes are used in those used blocks, so if you have 511 bytes in 1 block data, it will count as 512 bytes. “Size” is how many bytes are actually used regardless if your block is full or not.

This all, if I’m not mistaking…

You can always check this by dividing “Physical Size” in 512, it should be a number without a “,” ( or “.”, depends on where you’re living). “Size” however can be (but is not always) something with a “,” or “.”