File#size and File#size? follow links?

Do File#size and File#size? follow links?
It would certainly appear to be so, but docs don’t say.
Don’t symlinks have a size of some sort of their own?
Kind of confused by this. (Hard links are a bit more of a mind-bender
at times. I’m afraid to create or use them for fear of black holes. )

On Apr 27, 7:57 am, John J. [email protected]
wrote:

Do File#size and File#size? follow links?
It would certainly appear to be so, but docs don’t say.
Don’t symlinks have a size of some sort of their own?
Kind of confused by this. (Hard links are a bit more of a mind-bender
at times. I’m afraid to create or use them for fear of black holes. )

Yes, it follows links. If you want to report on the size of the link
itself, use File.lstat(‘link’).size.

Regards,

Dan

On Apr 27, 2007, at 11:45 PM, Daniel B. wrote:

Regards,

Dan

Thanks, Dan!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs