获取具有损坏的符号链接的目录中的目录条目列表

时间:2023-01-07 16:25:49

I'm using CCL on OS X Yosemite.

我在OS X Yosemite上使用CCL。

When I use e.g.

当我使用例如

(directory "*")

in directory

/Users/Tom

for listing all directory entries, but /Users/Tom contains a broken symbolic link (e.g. slime where the directory linked to does not exist any more),

列出所有目录条目,但/ Users / Tom包含一个损坏的符号链接(例如,链接到的目录不再存在的粘液),

File #P"/Users/Tom/slime" does not exist.
   [Condition of type CCL::SIMPLE-FILE-ERROR]

is thrown.

Is there a way to get get a list of directory entries in such a directory with a broken symbolic link?

有没有办法在这样的目录中获取目录条目列表,其中包含断开的符号链接?

1 个解决方案

#1


One option is to use the non-standard CCL extension :follow-links nil. Most implementations have something similar as an extra option to directory.

一种选择是使用非标准CCL扩展:follow-links nil。大多数实现都有类似于目录的额外选项。

#1


One option is to use the non-standard CCL extension :follow-links nil. Most implementations have something similar as an extra option to directory.

一种选择是使用非标准CCL扩展:follow-links nil。大多数实现都有类似于目录的额外选项。