I just found out something interesting about file attributes and broken symlinks. The file command can't read them at all.
file attributes symlinkfile -owner
It's interesting because it tries to go straight to the linked file even
though I never told it to with readlink. It doesn't seem to care about
the symlink file.
That makes sense and I even find it convenient when trying to determine
whether it's a directory, for example. It doesn't care about the link,
it just looks at the target and saves me an extra step.
But the user may want to delete the link because it's no longer valid,
it's a broken link, in which case it may be good to see who the owner
is.
When checking for mtime, the file command also gets the date and time
of the target, not the link. I happen to like that behavior better,
but I can't figure out how to obtain the information on the symlink file specifically in case I need it. When was that symlink created (which is
very likely the same date and time as mtime)? It seems I can't extract
that information with Tcl.
The other file manager I have here (SpaceFM) treats a symlink like a
regular file, except that it displays the target file in the status bar.
For everything else, the target is ignored. Like I said, I often find
the Tcl way better, but what if I want or need the other way?
Is there a way?
--
Luc
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)