我正在尝试写入已经创建的 TextEdit 文件。该文件处于 rwxrwxrwx 模式,因此没有权限问题。
但是当我执行我的代码时,这里是错误:
error "Network file permission error." number -5000 from file "/Users/me/Desktop/A directory/file.txt" to «class fsrf»
我的代码在这里:
-- Writing in the TextEdit file
set file_URLs_content to "HEEEELLOOOOOO"
tell application "TextEdit"
set theFile to "/Users/me/Desktop/A directory/file.txt"
set file_ref to (open for access file theFile with write permission)
set eof file_ref to 0
write file_URLs_content to file_ref
close access file_ref
end tell
而且我的 file.txt 还是空的,如何避免这个错误?