テンポラリーフォルダ /var/folders
AppleScript サンプルコード
行番号 | ソース |
---|---|
001 | #! /usr/bin/env osascript |
002 | ----+----1----+----2----+-----3----+----4----+----5----+----6----+----7 |
003 | # com.cocolog-nifty.quicktimer.icefloe |
004 | ----+----1----+----2----+-----3----+----4----+----5----+----6----+----7 |
005 | |
006 | tell application "System Events" |
007 | tell application "Finder" |
008 | set aliasContainerDir to container of (path to temporary items folder from user domain) as alias |
009 | end tell |
010 | log (POSIX path of aliasContainerDir) as text |
011 | end tell |
012 | |
013 | --- |
014 | set strCommandText to ("/bin/bash -c '/usr/bin/dirname \"$(/usr/bin/mktemp -d)\"'") as text |
015 | log strCommandText |
016 | log (do shell script strCommandText) as text |
017 | |
018 | --- |
019 | #この記述だとパスがクローズで終わるケースがある(環境依存) |
020 | set strCommandText to ("/bin/zsh -c '/bin/echo $TMPDIR'") as text |
021 | log strCommandText |
022 | log (do shell script strCommandText) as text |
023 | |
024 | --- |
025 | use AppleScript version "2.8" |
026 | use framework "Foundation" |
027 | use scripting additions |
028 | set appFileManager to current application's NSFileManager's defaultManager() |
029 | set ocidTempDirURL to appFileManager's temporaryDirectory() |
030 | log ocidTempDirURL's |path|() as text |
031 | |
032 | --- |
033 | #この記述だとパスがクローズで終わるケースがある(環境依存) |
034 | set ocidTempDirPath to current application's NSTemporaryDirectory() |
035 | log ocidTempDirPath as text |
AppleScriptで生成しました |
| 固定リンク