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