更新时间:2023-11-29 15:56:22
在Unix系统上,两者都将返回true-在Unix中,所有内容都是文件,包括目录.但是要测试该名称是否被采用,您应该同时检查两者.可能会有一个名为"foo"的常规文件,这将阻止您创建目录名称"foo".
Both would return true on Unix systems - in Unix everything is a file, including directories. But to test if that name is taken, you should check both. There might be a regular file named 'foo', which would prevent you from creating a directory name 'foo'.