Macos 访问名为“的卷中的文件”;“家”;

Macos 访问名为“的卷中的文件”;“家”;,macos,file,applescript,Macos,File,Applescript,我的NAS有一个名为“home”的共享点,安装在Os X(大苏尔)中 这个应用程序脚本显示了一个bug。系统希望它是“/System/Volumes/Data/home”,而不是“/Volumes/home/” 对于测试,我编写了一个名为“dummy.txt”的文本文件(里面有“helloworld”),并运行以下行: get POSIX file "/Volumes/home/dummy.txt" -- returns the file object as follows

我的NAS有一个名为“home”的共享点,安装在Os X(大苏尔)中 这个应用程序脚本显示了一个bug。系统希望它是“/System/Volumes/Data/home”,而不是“/Volumes/home/”

对于测试,我编写了一个名为“dummy.txt”的文本文件(里面有“helloworld”),并运行以下行:

get POSIX file "/Volumes/home/dummy.txt" -- returns the file object as follows
--> document file "dummy.txt" of disk "home" 
-- or --> file "home:dummy.txt"
-- or --> "file:///Volumes/home/dummy.txt"

do shell script "cat" & space & quoted form of "/Volumes/home/dummy.txt"
--> "hello world"

get file "home:dummy.txt"
--> ERROR

do shell script "cat" & space & quoted form of POSIX path of "home:dummy.txt"
--> ERROR : no such file or directory

get POSIX path of "home:dummy.txt"
--> "/System/Volumes/Data/home/dummy.txt"

是否有解决方法?

将HFS路径强制为POSIX路径时,磁盘名
home
与启动磁盘顶层的不可见文件夹
home
冲突

要寻址外部卷,请始终使用语法

get POSIX file "/Volumes/home/dummy.txt" 


这是清楚的。我仍然无法访问使用«打开时…»方法删除的文件:我得到了一个别名列表。别名应该指向正确的位置。您可以直接从别名获取POSIX路径。只要避开HFS路径即可。
do shell script "cat" & space & quoted form of "/Volumes/home/dummy.txt"