pwd
pwd は、取り消し不可能、照会不可能、および編集不可能です。
アプリケーションの現在の作業ディレクトリのパスを表す文字列を返します。Maya が起動したディレクトリから始まりますが、ファイルをブラウズしたり、chdir コマンドによっても変わります。このフォルダには、system、fopen、popen などの操作を行うシステムレベルのコマンドがあります。作業フォルダは、シーン データが格納されているワークスペース フォルダとは関係がなく、シーンまたはプロジェクト固有のファイルの作成、アクセスに使用してはいけません。| string | 現在の作業ディレクトリ |
// The "pwd" comes in handy here since this proc will just create a
// lockfile in the current working directory, without having to
// explicitly know what it is. It can be used in conjunction with
// the "chdir" command to move amongst various directories that the
// user can vary at will.
//
global proc lockCurrentWorkingDirectory()
{
string $s = `pwd`;
int $fileId = `fopen ($s + "/LOCK") "w"`;
fprint $fileId "LOCKED\n";
fclose $fileId;
}