Ruby/File Directory/pwd
Материал из Wiki.crossplatform.ru
Версия от 17:57, 13 сентября 2010; ViGOur (Обсуждение | вклад)
change directories (using an absolute path), and then store the value of the directory path in a variable.
Dir.chdir( "/Users/mikejfz" ) home = Dir.pwd p home
find out what the current directory is with Dir.pwd
puts Dir.pwd Dir.chdir("/usr/bin") puts Dir.pwd