るりまサーチ

最速Rubyリファレンスマニュアル検索!
240件ヒット [101-200件を表示] (0.008秒)

別のキーワード

  1. pathname pwd
  2. fileutils pwd
  3. dir pwd
  4. ftp pwd
  5. net/ftp pwd

ライブラリ

クラス

モジュール

キーワード

検索結果

<< < 1 2 3 > >>

Dir.chdir(path) {|path| ... } -> object (18.0)

カレントディレクトリを path に変更します。

...た場合に発生します。

//emlist[例][ruby]{
Dir.chdir("/var/spool/mail")
p Dir.pwd #=> "/var/spool/mail"
Dir.chdir("/tmp") do
p Dir.pwd #=> "/tmp"
end
p Dir.pwd #=> "/var/spool/mail"

# ~ は展開されない
Dir.chdir("~/.ssh")...

Open3.#popen3(*cmd) -> [IO, IO, IO, Thread] (12.0)

外部プログラム cmd を実行し、そのプロセスの標準入力、標準出力、標準エラー 出力に接続されたパイプと実行したプロセスを待つためのスレッドを 4 要素の 配列で返します。

...# オプションを指定した場合。
Dir.chdir("/tmp")
Open3.popen3("pwd", :chdir=> "/") {|i,o,e,t|
p o.read.chomp #=> "/"
}

# オプションを指定しない場合。
Dir.chdir("/tmp")
Open3.popen3("pwd") {|i,o,e,t|
p o.read.chomp #=> "/tmp"
}

@see Kernel.#spawn...

Open3.#popen3(*cmd) {|stdin, stdout, stderr, wait_thr| ... } -> () (12.0)

外部プログラム cmd を実行し、そのプロセスの標準入力、標準出力、標準エラー 出力に接続されたパイプと実行したプロセスを待つためのスレッドを 4 要素の 配列で返します。

...# オプションを指定した場合。
Dir.chdir("/tmp")
Open3.popen3("pwd", :chdir=> "/") {|i,o,e,t|
p o.read.chomp #=> "/"
}

# オプションを指定しない場合。
Dir.chdir("/tmp")
Open3.popen3("pwd") {|i,o,e,t|
p o.read.chomp #=> "/tmp"
}

@see Kernel.#spawn...

shell (12.0)

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

...ists?(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")...
...(dir)
mkdir 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.c...

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

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

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

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

絞り込み条件を変える

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

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

...対パスであれば 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/test...

rdoc/generator/json_index (6.0)

他のジェネレータが生成する HTML で検索が行えるように、JSON の検索インデッ クスを生成するサブライブラリです。

...に使うために設計されています。:

class RDoc::Generator::Darkfish
def initialize options
# ...
@base_dir = Pathname.pwd.expand_path

@json_index = RDoc::Generator::JsonIndex.new self, options
end

def generate
# ...
@json_index.generate
e...

Dir.getwd -> String (1.0)

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

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

@raise Errno::EXXX カレントディレクトリの取得に失敗した場合に発生します(が、普通は失敗することはありません)。

//emlist[例][ruby]{
Dir.chdir("/tmp") #=> 0
Dir.getwd #=> "/tmp"
//}

FileUtils.#getwd -> String (1.0)

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

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

Net::FTP#getdir -> String (1.0)

カレントディレクトリを返します。

カレントディレクトリを返します。

@raise Net::FTPTempError 応答コードが 4yz のときに発生します。
@raise Net::FTPPermError 応答コードが 5yz のときに発生します。
@raise Net::FTPProtoError 応答コードが RFC 的に正しくない場合に発生します。
@raise Net::FTPReplyError 応答コードが上の場合以外で正しくない場合に発生します。

絞り込み条件を変える

<< < 1 2 3 > >>