我应该如何设置/Library/Frameworks/SDL.framework
的路径我这样做了:
set sourceFolder to (path to library folder)
set Sdl to (sourceFolder as string) & "Frameworks/SDL.framework" ----Wrong??? correct way???
tell application "Finder"
if exists folder Sdl then
delete folder Sdl
end if
end tell
答案 0 :(得分:2)
你真的很亲密。 'path to'返回:path,而不是Posix路径,因此你的Sdl定义中的斜杠需要是冒号:。
set sourceFolder to (path to library folder)
set Sdl to ((sourceFolder as string) & "Frameworks:SDL.framework")
tell application "Finder"
if exists folder Sdl then
delete folder Sdl
end if
end tell