Is there a single way of detecting if a directory/file/symlink/etc. entity (more generalized) exists?
I need a single function because I need to check an array of paths that could be directories, files or symlinks. I know File.exists?"file_path" works for directories and files but not for symlinks (which is File.symlink?"symlink_path").
trueif the symlink exists, regardless of whether it can be ultimately resolved to a non-symlink. I.e. it should returntruefor broken links as well.File.exists?will only returntruefor a symlink that's not broken.