dodb.cr/readlink.cr

5 lines
114 B
Crystal

pp! ARGV[0]
pp! File.readlink(ARGV[0]).sub(/^.*\//, "").to_i
pp! File.exists? ARGV[0]
pp! File.symlink? ARGV[0]