Get stat for your file : lstat « File Directory « Ruby






Get stat for your file


File.lstat('test_file').mode & 0777       # Keep only the permission bits.
# => 420                                  # That is, 0644 octal.

 

Related examples in the same category

1.lstat: Same as IO#stat, but does not follow the last symbolic link.