るりまサーチ

最速Rubyリファレンスマニュアル検索!
168件ヒット [1-100件を表示] (0.117秒)
トップページ > クエリ:t[x] > クエリ:@[x] > 種類:インスタンスメソッド[x] > クエリ:args[x] > クラス:Pathname[x]

別のキーワード

  1. openssl t61string
  2. asn1 t61string
  3. matrix t
  4. t61string new
  5. fiddle align_size_t

ライブラリ

キーワード

検索結果

<< 1 2 > >>

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

Pathname#fnmatch(pattern, *args) -> bool (6243.0)

File.fnmatch(pattern, self.to_s, *args) と同じです。

...e.fnmatch(pattern, self.to_s, *args) と同じです。

@
param pattern パターンを文字列で指定します。ワイルドカードとして `*', `?', `[]' が使用できま
す。Dir.glob とは違って `{}' や `**/' は使用できません。

@
param args File.fnmatch を...
...参照してください。

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

path = Pathname("testfile")
path.fnmatch("test*") # => true
path.fnmatch("TEST*") # => false
path.fnmatch("TEST*", File::FNM_CASEFOLD) # => true
//}

@
see File.fnmatch...

Pathname#fnmatch?(pattern, *args) -> bool (6243.0)

File.fnmatch?(pattern, self.to_s, *args) と同じです。

...e.fnmatch?(pattern, self.to_s, *args) と同じです。

@
param pattern パターンを文字列で指定します。ワイルドカードとして `*', `?', `[]' が使用できま
す。Dir.glob とは違って `{}' や `**/' は使用できません。

@
param args File.fnmatch...
...を参照してください。

@
see File.fnmatch?...

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

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

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


@
see IO.binwrite...

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

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

...ch(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\n")
Pathname
("testfile").each_line {|f| p f }

# => "line1\n"
# => "line2,\n"
# => "line3\n"
//}

//emlist[例 limit を指定][ruby]{
require "pathname"

IO.write("testfile", "line1\nline2,\nline3\n")
Pathname
("testfile").each_line(4) {|f| p f }

# => "line"
# => "1\n"
# => "l...
...ine"
# => "2,\n"
# => "line"
# => "3\n"
//}

//emlist[例 sep を指定][ruby]{
require "pathname"

IO.write("testfile", "line1\nline2,\nline3\n")
Pathname
("testfile").each_line(",") {|f| p f }

# => "line1\nline2,"
# => "\nline3\n"
//}

@
see IO.foreach...

絞り込み条件を変える

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

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

...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) # => "ne one\nThis is line "
//}

@
see IO.binread...

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

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

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


@
see IO.read...

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

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

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


@
see IO.readlines...

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

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

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


@
see IO.sysopen...
<< 1 2 > >>