如何设置/ Library / Frameworks的路径

时间:2014-06-10 15:24:24

标签: applescript

我应该如何设置/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

1 个答案:

答案 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