file_type_l(string f) behaves exactly like file_type, but does not follow symbolic links. It will return `symlink if called with a symbolic link's filename.
file_type