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;
}