るりまサーチ

最速Rubyリファレンスマニュアル検索!
80件ヒット [1-80件を表示] (0.100秒)
トップページ > クエリ:l[x] > クエリ:pwd[x]

別のキーワード

  1. kernel $-l
  2. matrix l
  3. _builtin $-l
  4. lupdecomposition l
  5. l

ライブラリ

クラス

モジュール

キーワード

検索結果

FileUtils.#pwd -> String (18101.0)

プロセスのカレントディレクトリを文字列で返します。

プロセスのカレントディレクトリを文字列で返します。

Shell#pwd -> String (18101.0)

カレントディレクトリのパスを文字列で返します。

...カレントディレクトリのパスを文字列で返します。

使用例
require 'shell'
sh = Shell.new
p sh.cwd
# 例
#=> "/Users/kouya/tall"...

shell (6012.0)

Ruby 上で sh/csh のようにコマンドの実行及びフィルタリングを手軽に行うためのライブラリです。

...プル

==== Example 1:

require 'shell'
sh = Shell.cd("/tmp")
sh.mkdir "shell-test-1" unless sh.exists?("shell-test-1")
sh.cd("shell-test-1")
for dir in ["dir1", "dir3", "dir5"]
unless sh.exists?(dir)
sh.mkdir dir
sh.cd(dir) do
f = sh.open("tmpFile", "w")
f...
....puts "TEST"
f.close
end
print sh.pwd
end
end

==== Example 2:

require 'shell'
sh = Shell.cd("/tmp")
sh.transact do
mkdir "shell-test-1" unless exists?("shell-test-1")
cd("shell-test-1")
for dir in ["dir1", "dir3", "dir5"]
if !exists?(dir)
m...
...kdir dir
cd(dir) do
f = open("tmpFile", "w")
f.print "TEST\n"
f.close
end
print pwd
end
end
end

==== Example 3: Using Pipe

require 'shell'
sh = Shell.new
sh.cat("/etc/printcap") | sh.tee("tee1") > "tee2"
(sh.cat < "/etc/prin...

Shell.new(pwd = Dir.pwd, umask = nil) -> Shell (3336.0)

プロセスのカレントディレクトリをpwd で指定されたディレクトリとするShellオ ブジェクトを生成します.

...ディレクトリをpwd で指定されたディレクトリとするShell
ブジェクトを生成します.

@param pwd プロセスのカレントディレクトリをpwd で指定されたディレクトリとします。
指定しない場合は、Dir.pwd が使用されます。...

Gem::DependencyInstaller#find_gems_with_sources(dep) -> Array (3006.0)

与えられた条件にマッチする Gem::Specification のインスタンスと URI のペアのリストを 返します。

...られた条件にマッチする Gem::Specification のインスタンスと URI のペアのリストを
返します。

Gem はローカル (Dir.pwd) とリモート (Gem.sources) の両方から検索します。
結果は、バージョンの新しい順が先にきます。また、ローカ...

絞り込み条件を変える

FileUtils.#getwd -> String (3001.0)

プロセスのカレントディレクトリを文字列で返します。

プロセスのカレントディレクトリを文字列で返します。

Shell#cwd -> String (3001.0)

カレントディレクトリのパスを文字列で返します。

...カレントディレクトリのパスを文字列で返します。

使用例
require 'shell'
sh = Shell.new
p sh.cwd
# 例
#=> "/Users/kouya/tall"...

Shell#dir -> String (3001.0)

カレントディレクトリのパスを文字列で返します。

...カレントディレクトリのパスを文字列で返します。

使用例
require 'shell'
sh = Shell.new
p sh.cwd
# 例
#=> "/Users/kouya/tall"...

Shell#getwd -> String (3001.0)

カレントディレクトリのパスを文字列で返します。

...カレントディレクトリのパスを文字列で返します。

使用例
require 'shell'
sh = Shell.new
p sh.cwd
# 例
#=> "/Users/kouya/tall"...

Pathname#expand_path(default_dir = &#39;.&#39;) -> Pathname (106.0)

Pathname.new(File.expand_path(self.to_s, *args)) と同じです。

...Pathname.new(File.expand_path(self.to_s, *args)) と同じです。

@param default_dir self が相対パスであれば default_dir を基準に展開されます。

//emlist[例][ruby]{
require "pathname"

path = Pathname("testfile")
Pathname.pwd # => #<Pathname:/path/to>
path.expand_...
...path # => #<Pathname:/path/to/testfile>
path.expand_path("../") # => #<Pathname:/path/testfile>
//}

@see File.expand_path...

絞り込み条件を変える