symlink?

stat.symlink? รข true or false
Instance Public methods

Returns true if stat is a symbolic link, false if it isn't or if the operating system doesn't support this feature. As File::stat automatically follows symbolic links, symlink? will always be false for an object returned by File::stat.

File.symlink("testfile", "alink")   #=> 0
File.stat("alink").symlink?         #=> false
File.lstat("alink").symlink?        #=> true
doc_ruby_on_rails
2015-04-06 08:35:46
Comments
Leave a Comment

Please login to continue.