るりまサーチ

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

別のキーワード

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

ライブラリ

キーワード

検索結果

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

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

@
see IO.write...

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

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

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


@
see IO.binwrite...

Pathname#ctime -> Time (6214.0)

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

...e.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#each_line(*args) -> Enumerator (3132.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#each_line(*args) {|line| ... } -> nil (3032.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...

絞り込み条件を変える