るりまサーチ (Ruby 2.7.0)

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

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. matrix i
  5. ipaddr to_i

ライブラリ

クラス

キーワード

検索結果

Pathname#each_child(with_directory = true) {|pathname| ...} -> [Pathname] (70270.0)

self.children(with_directory).each と同じです。

self.children(with_directory).each と同じです。

@param with_directory 偽を指定するとファイル名のみ返します。デフォルトは真です。

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

Pathname("/usr/local").each_child {|f| p f }
# => #<Pathname:/usr/local/bin>
# => #<Pathname:/usr/local/etc>
# => #<Pathname:/usr/local/include>
# => #<Pathname:/us...

Pathname#realdirpath(basedir = nil) -> Pathname (70045.0)

Pathname#realpath とほぼ同じで、最後のコンポーネントは実際に 存在しなくてもエラーになりません。

Pathname#realpath とほぼ同じで、最後のコンポーネントは実際に
存在しなくてもエラーになりません。

@param basedir ベースディレクトリを指定します。省略するとカレントディレクトリになります。

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

path = Pathname("/not_exist")
path.realdirpath # => #<Pathname:/not_exist>
path.realpath # => Errno::ENOENT

# 最後ではないコンポーネント(/not_exist_1)も存在し...

Pathname#binwrite(string, offset=nil) -> Integer (69904.0)

IO.binwrite(self.to_s, *args)と同じです。

IO.binwrite(self.to_s, *args)と同じです。


@see IO.binwrite

Pathname#utime(atime, mtime) -> Integer (69904.0)

File.utime(atime, mtime, self.to_s) と同じです。

File.utime(atime, mtime, self.to_s) と同じです。

@param atime 最終アクセス時刻を Time か、起算時からの経過秒数を数値で指定します。

@param mtime 更新時刻を Time か、起算時からの経過秒数を数値で指定します。


@see File.utime

Pathname#entries -> [Pathname] (69871.0)

self に含まれるファイルエントリ名を元にした Pathname オブジェクトの配列を返します。

self に含まれるファイルエントリ名を元にした Pathname オブジェクトの配列を返します。

@raise Errno::EXXX self が存在しないパスであったりディレクトリでなければ例外が発生します。

//emlist[例][ruby]{
require 'pathname'
require 'pp'

pp Pathname('/usr/local').entries
# => [#<Pathname:.>,
# #<Pathname:..>,
# #<Pathname:bin>,
# #<Pathname:etc>,
# #<Pathnam...

絞り込み条件を変える

Pathname#each_line(*args) {|line| ... } -> nil (69748.0)

IO.foreach(self.to_s, *args, &block) と同じです。

IO.foreach(self.to_s, *args, &block) と同じです。

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

IO.write("testfile", "line1\nline2,\nline3\n")
Pathname("testfile").each_line
# => #<Enumerator: IO:foreach("testfile")>
//}

//emlist[例 ブロックを指定][ruby]{
require "pathname"

IO.write("testfile", "line1\nline2,\nline3\...

Pathname#relative_path_from(base_directory) -> Pathname (69745.0)

base_directory から self への相対パスを求め、その内容の新しい Pathname オブジェクトを生成して返します。

base_directory から self への相対パスを求め、その内容の新しい Pathname
オブジェクトを生成して返します。

パス名の解決は文字列操作によって行われ、ファイルシステムをアクセス
しません。

self が相対パスなら base_directory も相対パス、self が絶対パスなら
base_directory も絶対パスでなければなりません。

@param base_directory ベースディレクトリを表す Pathname オブジェクトを指定します。

@raise ArgumentError Windows上でドライブが違うなど、base_direct...

Pathname#children(with_directory = true) -> [Pathname] (69727.0)

self 配下にあるパス名(Pathnameオブジェクト)の配列を返します。

self 配下にあるパス名(Pathnameオブジェクト)の配列を返します。

ただし、 ".", ".." は要素に含まれません。

@param with_directory 偽を指定するとファイル名のみ返します。デフォルトは真です。

@raise Errno::EXXX self が存在しないパスであったりディレクトリでなければ例外が発生します。

//emlist[例][ruby]{
require 'pathname'
Pathname.new("/tmp").children # => [#<Pathname:.X11-unix>, #<Pathname:.iroha_unix>...

Pathname#join(*args) -> Pathname (69715.0)

与えられたパス名を連結します。

与えられたパス名を連結します。

@param args 連結したいディレクトリ名やファイル名を文字列で与えます。

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

path0 = Pathname("/usr") # Pathname:/usr
path0 = path0.join("bin/ruby") # Pathname:/usr/bin/ruby
# 上記の path0 の処理は下記の path1 と同様のパスになります
path1 = Pathname("/usr") + "bin/ruby" ...

Pathname#binread(*args) -> String | nil (69712.0)

IO.binread(self.to_s, *args)と同じです。

IO.binread(self.to_s, *args)と同じです。

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

pathname = Pathname("testfile")
pathname.binread # => "This is line one\nThis is line two\nThis is line three\nAnd so on...\n"
pathname.binread(20) # => "This is line one\nThi"
pathname.binread(20, 10) # => ...

絞り込み条件を変える

Pathname#ctime -> Time (69712.0)

File.ctime(self.to_s) を渡したものと同じです。

File.ctime(self.to_s) を渡したものと同じです。

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

IO.write("testfile", "test")
pathname = Pathname("testfile")
pathname.ctime # => 2019-01-14 00:39:51 +0900
sleep 1
pathname.chmod(0755)
pathname.ctime # => 2019-01-14 00:39:52 +0900
//}

@see File.ctime

Pathname#dirname -> Pathname (69709.0)

Pathname.new(File.dirname(self.to_s)) と同じです。

Pathname.new(File.dirname(self.to_s)) と同じです。

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

Pathname('/usr/bin/shutdown').dirname # => #<Pathname:/usr/bin>
//}

@see File.dirname

Pathname#atime -> Time (69676.0)

File.atime(self.to_s) を渡したものと同じです。

File.atime(self.to_s) を渡したものと同じです。

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

pathname = Pathname("testfile")
pathname.atime # => 2018-12-18 20:58:13 +0900
//}

@see File.atime

Pathname#find(ignore_error: true) {|pathname| ...} -> nil (69673.0)

self 配下のすべてのファイルやディレクトリを 一つずつ引数 pathname に渡してブロックを実行します。

self 配下のすべてのファイルやディレクトリを
一つずつ引数 pathname に渡してブロックを実行します。

require 'find'
Find.find(self.to_s) {|f| yield Pathname.new(f)}

と同じです。

ブロックを省略した場合は Enumerator を返します。

@param ignore_error 探索中に発生した例外を無視するかどうかを指定します。

@see Find.#find

Pathname#each_child(with_directory = true) -> Enumerator (69670.0)

self.children(with_directory).each と同じです。

self.children(with_directory).each と同じです。

@param with_directory 偽を指定するとファイル名のみ返します。デフォルトは真です。

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

Pathname("/usr/local").each_child {|f| p f }
# => #<Pathname:/usr/local/bin>
# => #<Pathname:/usr/local/etc>
# => #<Pathname:/usr/local/include>
# => #<Pathname:/us...

絞り込み条件を変える

Pathname#readlink -> Pathname (69655.0)

Pathname.new(File.readlink(self.to_s)) と同じです。

Pathname.new(File.readlink(self.to_s)) と同じです。


@see File.readlink

Pathname#each_filename {|v| ... } -> nil (69640.0)

self のパス名要素毎にブロックを実行します。

self のパス名要素毎にブロックを実行します。

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

Pathname.new("/foo/../bar").each_filename {|v| p v}

# => "foo"
# ".."
# "bar"
//}

Pathname#mtime -> Time (69604.0)

File.mtime(self.to_s) を渡したものと同じです。

File.mtime(self.to_s) を渡したものと同じです。


@see File.mtime

Pathname#opendir -> Dir (69604.0)

Dir.open(self.to_s, &block) と同じです。

Dir.open(self.to_s, &block) と同じです。


@see Dir.open

Pathname#opendir {|dir| ... } -> nil (69604.0)

Dir.open(self.to_s, &block) と同じです。

Dir.open(self.to_s, &block) と同じです。


@see Dir.open

絞り込み条件を変える

Pathname#readlines(*args) -> [String] (69604.0)

IO.readlines(self.to_s, *args)と同じです。

IO.readlines(self.to_s, *args)と同じです。


@see IO.readlines

Pathname#each_line(*args) -> Enumerator (69448.0)

IO.foreach(self.to_s, *args, &block) と同じです。

IO.foreach(self.to_s, *args, &block) と同じです。

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

IO.write("testfile", "line1\nline2,\nline3\n")
Pathname("testfile").each_line
# => #<Enumerator: IO:foreach("testfile")>
//}

//emlist[例 ブロックを指定][ruby]{
require "pathname"

IO.write("testfile", "line1\nline2,\nline3\...

Pathname#split -> Array (69412.0)

File.split(self.to_s) と同じです。

File.split(self.to_s) と同じです。

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

pathname = Pathname("/path/to/sample")
pathname.split # => [#<Pathname:/path/to>, #<Pathname:sample>]
//}

@see File.split

Pathname#find(ignore_error: true) -> Enumerator (69373.0)

self 配下のすべてのファイルやディレクトリを 一つずつ引数 pathname に渡してブロックを実行します。

self 配下のすべてのファイルやディレクトリを
一つずつ引数 pathname に渡してブロックを実行します。

require 'find'
Find.find(self.to_s) {|f| yield Pathname.new(f)}

と同じです。

ブロックを省略した場合は Enumerator を返します。

@param ignore_error 探索中に発生した例外を無視するかどうかを指定します。

@see Find.#find

Pathname#mountpoint? -> bool (69358.0)

self がマウントポイントであれば真を返します。

self がマウントポイントであれば真を返します。

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

path = Pathname("/")
path.mountpoint? # => true
path = Pathname("/usr")
path.mountpoint? # => false
//}

絞り込み条件を変える

Pathname#relative? -> bool (69358.0)

self が相対パス指定であれば真を返します。

self が相対パス指定であれば真を返します。

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

p = Pathname.new('/im/sure')
p.relative? #=> false

p = Pathname.new('not/so/sure')
p.relative? #=> true
//}

Pathname#birthtime -> Time (69304.0)

File.birthtime(self.to_s) を渡したものと同じです。

File.birthtime(self.to_s) を渡したものと同じです。

@raise NotImplementedError Windows のような birthtime のない環境で発生します。


@see File.birthtime

Pathname#directory? -> bool (69304.0)

FileTest.directory?(self.to_s) と同じです。

FileTest.directory?(self.to_s) と同じです。


@see FileTest.#directory?

Pathname#exist? -> bool (69304.0)

FileTest.exist?(self.to_s) と同じです。

FileTest.exist?(self.to_s) と同じです。


@see FileTest.#exist?

Pathname#file? -> bool (69304.0)

FileTest.file?(self.to_s) と同じです。

FileTest.file?(self.to_s) と同じです。


@see FileTest.#file?

絞り込み条件を変える

Pathname#make_link(old) -> 0 (69304.0)

File.link(old, self.to_s) と同じです。

File.link(old, self.to_s) と同じです。


@see File.link

Pathname#make_symlink(old) -> 0 (69304.0)

File.symlink(old, self.to_s) と同じです。

File.symlink(old, self.to_s) と同じです。


@see File.symlink

Pathname#mkdir(*args) -> 0 (69304.0)

Dir.mkdir(self.to_s, *args) と同じです。

Dir.mkdir(self.to_s, *args) と同じです。


@see Dir.mkdir

Pathname#pipe? -> bool (69304.0)

FileTest.pipe?(self.to_s) と同じです。

FileTest.pipe?(self.to_s) と同じです。


@see FileTest.#pipe?

Pathname#rmdir -> 0 (69304.0)

Dir.rmdir(self.to_s) と同じです。

Dir.rmdir(self.to_s) と同じです。


@see Dir.rmdir

絞り込み条件を変える

Pathname#setgid? -> bool (69304.0)

FileTest.setgid?(self.to_s) と同じです。

FileTest.setgid?(self.to_s) と同じです。


@see FileTest.#setgid?

Pathname#setuid? -> bool (69304.0)

FileTest.setuid?(self.to_s) と同じです。

FileTest.setuid?(self.to_s) と同じです。


@see FileTest.#setuid?

Pathname#size -> Integer (69304.0)

FileTest.size(self.to_s) と同じです。

FileTest.size(self.to_s) と同じです。


@see FileTest.#size

Pathname#size? -> bool (69304.0)

FileTest.size?(self.to_s) と同じです。

FileTest.size?(self.to_s) と同じです。


@see FileTest.#size?

Pathname#sticky? -> bool (69304.0)

FileTest.sticky?(self.to_s) と同じです。

FileTest.sticky?(self.to_s) と同じです。


@see FileTest.#sticky?

絞り込み条件を変える

Pathname#symlink? -> bool (69304.0)

FileTest.symlink?(self.to_s) と同じです。

FileTest.symlink?(self.to_s) と同じです。


@see FileTest.#symlink?

Pathname#world_writable? -> bool (69304.0)

FileTest.world_writable?(self.to_s) と同じです。

FileTest.world_writable?(self.to_s) と同じです。


@see FileTest.#world_writable?

Pathname#writable? -> bool (69304.0)

FileTest.writable?(self.to_s) と同じです。

FileTest.writable?(self.to_s) と同じです。


@see FileTest.#writable?

Pathname#writable_real? -> bool (69304.0)

FileTest.writable_real?(self.to_s) と同じです。

FileTest.writable_real?(self.to_s) と同じです。


@see FileTest.#writable_real?

Pathname#write(string, offset=nil, **opts) -> Integer (69304.0)

IO.write(self.to_s, string, offset, **opts)と同じです。

@see IO.write

絞り込み条件を変える

Pathname#unlink -> Integer (60712.0)

self が指すディレクトリあるいはファイルを削除します。

self が指すディレクトリあるいはファイルを削除します。

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

pathname = Pathname("/path/to/sample")
pathname.exist? # => true
pathname.unlink # => 1
pathname.exist? # => false
//}

Net::FTP::MLSxEntry#pathname -> String (54607.0)

パス名を返します。

パス名を返します。

Pathname#ascend {|pathname| ... } -> nil (51871.0)

self のパス名から親方向に辿っていったときの各パス名を新しい Pathname オ ブジェクトとして生成し、ブロックへの引数として渡して実行します。 ブロックを省略した場合は Enumerator を返します。

self のパス名から親方向に辿っていったときの各パス名を新しい Pathname オ
ブジェクトとして生成し、ブロックへの引数として渡して実行します。
ブロックを省略した場合は Enumerator を返します。

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

Pathname.new('/path/to/some/file.rb').ascend {|v| p v}
# => #<Pathname:/path/to/some/file.rb>
# #<Pathname:/path/to/some>
# #<Pathname:/path/to>
...

Pathname#descend {|pathname| ... } -> nil (51871.0)

self のパス名の親から子供へと辿っていったときの各パス名を新しい Pathname オブジェクトとして生成し、ブロックへの引数として渡して実行しま す。 ブロックを省略した場合は Enumerator を返します。

self のパス名の親から子供へと辿っていったときの各パス名を新しい
Pathname オブジェクトとして生成し、ブロックへの引数として渡して実行しま
す。
ブロックを省略した場合は Enumerator を返します。

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

Pathname.new('/path/to/some/file.rb').descend {|v| p v}
# => #<Pathname:/>
# #<Pathname:/path>
# #<Pathname:/path/to>
# #<Pathname:/path/to/s...

Pathname#basename(suffix = "") -> Pathname (51853.0)

Pathname.new(File.basename(self.to_s, suffix)) と同じです。

Pathname.new(File.basename(self.to_s, suffix)) と同じです。

@param suffix サフィックスを文字列で与えます。'.*' という文字列を与えた場合、'*' はワイルドカードとして働き
'.' を含まない任意の文字列にマッチします。

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

Pathname("ruby/ruby.c").basename #=> #<Pathname:"ruby.c">
Pathname("ruby/ruby.c").basename("...

絞り込み条件を変える

Pathname#each_entry {|pathname| ... } -> nil (51817.0)

Dir.foreach(self.to_s) {|f| yield Pathname.new(f) } と同じです。

Dir.foreach(self.to_s) {|f| yield Pathname.new(f) } と同じです。


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

Pathname("/usr/local").each_entry {|f| p f }

# => #<Pathname:.>
# => #<Pathname:..>
# => #<Pathname:bin>
# => #<Pathname:etc>
# => #<Pathname:include>
# => #<Pathname:lib>
# => #<Pathname:opt>
//}

@...

Pathname#cleanpath(consider_symlink = false) -> Pathname (51799.0)

余計な "."、".." や "/" を取り除いた新しい Pathname オブジェクトを返します。

余計な "."、".." や "/" を取り除いた新しい Pathname オブジェクトを返します。

cleanpath は、実際にファイルシステムを参照することなく、文字列操作
だけで処理を行います。

@param consider_symlink 真ならパス要素にシンボリックリンクがあった場合
にも問題ないように .. を残します。

//emlist[例][ruby]{
require "pathname"
path = Pathname.new("//.././../")
path # => #<Pa...

Pathname#glob(pattern, flags=0) {|pathname| ...} -> nil (51766.0)

ワイルドカードの展開を行なった結果を、 Pathname オブジェクトの配列として返します。

ワイルドカードの展開を行なった結果を、
Pathname オブジェクトの配列として返します。

引数の意味は、Dir.glob と同じです。 flag の初期値である 0 は「何
も指定しない」ことを意味します。

ブロックが与えられたときは、ワイルドカードにマッチした Pathname オブジェ
クトを1つずつ引数としてそのブロックに与えて実行させます。この場合、値と
しては nil を返します。

このメソッドは内部で Dir.glob の base キーワード引数を使っています。

@param pattern ワイルドカードパターンです
@param flags パターンマッチ時...

Pathname#expand_path(default_dir = &#39;.&#39;) -> Pathname (51763.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.e...

Pathname#realpath(basedir = nil) -> Pathname (51748.0)

余計な "."、".." や "/" を取り除いた新しい Pathname オブジェクトを返します。

余計な "."、".." や "/" を取り除いた新しい Pathname オブジェクトを返します。

また、ファイルシステムをアクセスし、実際に存在するパスを返します。
シンボリックリンクも解決されます。

self が指すパスが存在しない場合は例外 Errno::ENOENT が発生します。

@param basedir ベースディレクトリを指定します。省略するとカレントディレクトリになります。

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

Dir.rmdir("/tmp/foo") rescue nil
File.unlink("/tmp/b...

絞り込み条件を変える

Pathname#<=>(other) -> -1 | 0 | 1 | nil (51496.0)

パス名を比較します。other と同じなら 0 を、ASCII順で self が大きい場合 は正、other が大きい場合は負を返します。大文字小文字は区別されます。 other は Pathname オブジェクトでなければなりません。

パス名を比較します。other と同じなら 0 を、ASCII順で self が大きい場合
は正、other が大きい場合は負を返します。大文字小文字は区別されます。
other は Pathname オブジェクトでなければなりません。

パス名の比較は単純にパス文字列の比較によって行われるので、論理的に
同じパスでもパス文字列が違えば異なると判断されます。

@param other 比較対象の Pathname オブジェクトを指定します。

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

p Pathname.new("foo/bar") <=> Pathn...

Pathname#realpath -> Pathname (51448.0)

余計な "."、".." や "/" を取り除いた新しい Pathname オブジェクトを返します。

余計な "."、".." や "/" を取り除いた新しい Pathname オブジェクトを返します。

また、ファイルシステムをアクセスし、実際に存在するパスを返します。
シンボリックリンクも解決されます。

self が指すパスが存在しない場合は例外 Errno::ENOENT が発生します。

@param basedir ベースディレクトリを指定します。省略するとカレントディレクトリになります。

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

Dir.rmdir("/tmp/foo") rescue nil
File.unlink("/tmp/b...

Pathname#delete -> Integer (51412.0)

self が指すディレクトリあるいはファイルを削除します。

self が指すディレクトリあるいはファイルを削除します。

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

pathname = Pathname("/path/to/sample")
pathname.exist? # => true
pathname.unlink # => 1
pathname.exist? # => false
//}

Pathname#chown(owner, group) -> Integer (51376.0)

File.chown(owner, group, self.to_s) と同じです。

File.chown(owner, group, self.to_s) と同じです。

@param owner オーナーを指定します。

@param group グループを指定します。

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

Pathname('testfile').stat.uid # => 501
Pathname('testfile').chown(502, 12)
Pathname('testfile').stat.uid # => 502
//}

@see File.chown, File#chown

Pathname#to_path -> String (51370.0)

File.open などの引数に渡す際に呼ばれるメソッドです。 Pathname オブジェ クトにおいては、 to_s と同じです。

File.open などの引数に渡す際に呼ばれるメソッドです。 Pathname オブジェ
クトにおいては、 to_s と同じです。


@see Pathname#to_s

絞り込み条件を変える

Pathname#to_s -> String (51340.0)

パス名を文字列で返します。

パス名を文字列で返します。


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

path = Pathname.new("/tmp/hogehoge")
File.open(path)
//}

Pathname#chmod(mode) -> Integer (51304.0)

File.chmod(mode, self.to_s) と同じです。

File.chmod(mode, self.to_s) と同じです。

@param mode ファイルのアクセス権限を整数で指定します。


@see File.chmod

Pathname#extname -> String (51304.0)

File.extname(self.to_s) と同じです。

File.extname(self.to_s) と同じです。


@see File.extname

Pathname#ftype -> String (51304.0)

File.ftype(self.to_s) と同じです。

File.ftype(self.to_s) と同じです。


@see File.ftype

Pathname#hash -> Integer (51304.0)

ハッシュ値を返します。

ハッシュ値を返します。

絞り込み条件を変える

Pathname#lchmod(mode) -> Integer (51304.0)

File.lchmod(mode, self.to_s) と同じです。

File.lchmod(mode, self.to_s) と同じです。

@param mode ファイルのアクセス権限を整数で指定します。


@see File.lchmod

Pathname#lchown(owner, group) -> Integer (51304.0)

File.lchown(owner, group, self.to_s) と同じです。

File.lchown(owner, group, self.to_s) と同じです。

@param owner オーナーを指定します。

@param group グループを指定します。


@see File.lchown

Pathname#lstat -> File::Stat (51304.0)

File.lstat(self.to_s) と同じです。

File.lstat(self.to_s) と同じです。


@see File.lstat

Pathname#mkpath -> nil (51304.0)

FileUtils.mkpath(self.to_s) と同じです。

FileUtils.mkpath(self.to_s) と同じです。


@see FileUtils.#mkpath

Pathname#open(mode = &#39;r&#39;, perm = 0666) -> File (51304.0)

File.open(self.to_s, *args, &block) と同じです。

File.open(self.to_s, *args, &block) と同じです。


@see File.open

絞り込み条件を変える

Pathname#open(mode = &#39;r&#39;, perm = 0666) {|file| ... } -> object (51304.0)

File.open(self.to_s, *args, &block) と同じです。

File.open(self.to_s, *args, &block) と同じです。


@see File.open

Pathname#read(*args) -> String | nil (51304.0)

IO.read(self.to_s, *args)と同じです。

IO.read(self.to_s, *args)と同じです。


@see IO.read

Pathname#rmtree -> nil (51304.0)

FileUtils.rm_r(self.to_s) と同じです。

FileUtils.rm_r(self.to_s) と同じです。


@see FileUtils.#rm_r

Pathname#stat -> File::Stat (51304.0)

File.stat(self.to_s) と同じです。

File.stat(self.to_s) と同じです。


@see File.stat

Pathname#sysopen(*args) -> Integer (51304.0)

IO.sysopen(self.to_s, *args)と同じです。

IO.sysopen(self.to_s, *args)と同じです。


@see IO.sysopen

絞り込み条件を変える

RDoc::Options#page_dir -> Pathname | nil (18607.0)

コマンドライン引数の --page-dir オプションで指定したディレクトリを返し ます。

コマンドライン引数の --page-dir オプションで指定したディレクトリを返し
ます。

指定されていない場合は nil を返します。

RDoc::Options#root -> Pathname (9307.0)

コマンドライン引数の --root オプションで指定したディレクトリを返します。

コマンドライン引数の --root オプションで指定したディレクトリを返します。

指定されていない場合はカレントディレクトリを返します。

Net::FTP#mlsd(pathname = nil) -> [Net::FTP::MLSxEntry] (730.0)

pathname で指定したディレクトリに含まれているファイルの詳細な情報を得ます。

pathname で指定したディレクトリに含まれているファイルの詳細な情報を得ます。

ディレクトリの各ファイルの情報が
Net::FTP::MLSxEntry のオブジェクトの配列として得られます。
どのような情報を取り出せるかは Net::FTP::MLSxEntry
を参照してください。
Net::FTP#list は
結果が文字列で得られるため、それを適当に解釈する必要がありますが、
このコマンドの結果は適切に解釈された結果を直接得ることができます。

pathname を省略した場合はカレントディレクトリを指定したことになります。

ブロックを渡した場合にはディレクトリの各ファイル...

Net::FTP#mlsd(pathname = nil) {|entry| ... } -> () (730.0)

pathname で指定したディレクトリに含まれているファイルの詳細な情報を得ます。

pathname で指定したディレクトリに含まれているファイルの詳細な情報を得ます。

ディレクトリの各ファイルの情報が
Net::FTP::MLSxEntry のオブジェクトの配列として得られます。
どのような情報を取り出せるかは Net::FTP::MLSxEntry
を参照してください。
Net::FTP#list は
結果が文字列で得られるため、それを適当に解釈する必要がありますが、
このコマンドの結果は適切に解釈された結果を直接得ることができます。

pathname を省略した場合はカレントディレクトリを指定したことになります。

ブロックを渡した場合にはディレクトリの各ファイル...

Net::FTP#mlst(pathname = nil) -> Net::FTP::MLSxEntry (691.0)

pathname で指定したファイル/ディレクトリの詳細な情報を得ます。

pathname で指定したファイル/ディレクトリの詳細な情報を得ます。

Net::FTP::MLSxEntry のインスタンスに得られた情報が
保持されます。どのような情報を取り出せるかは Net::FTP::MLSxEntry
を参照してください。
Net::FTP#list は
結果が文字列で得られるため、それを適当に解釈する必要がありますが、
このコマンドの結果は適切に解釈された結果を直接得ることができます。

pathname を省略した場合はカレントディレクトリを指定したことになります。

FTP の MLST コマンド 3659 を使います。

@param pathname...

絞り込み条件を変える