From 714300bdb5a9761a54ccb864eba18eea255f2003 Mon Sep 17 00:00:00 2001 From: Philippe PITTOLI Date: Sun, 12 May 2024 03:15:02 +0200 Subject: [PATCH] Readlink. --- readlink.cr | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 readlink.cr diff --git a/readlink.cr b/readlink.cr new file mode 100644 index 0000000..65ea50e --- /dev/null +++ b/readlink.cr @@ -0,0 +1,4 @@ +pp! ARGV[0] +pp! File.readlink(ARGV[0]).sub(/^.*\//, "").to_i +pp! File.exists? ARGV[0] +pp! File.symlink? ARGV[0]