るりまサーチ

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

別のキーワード

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

ライブラリ

キーワード

検索結果

<< 1 2 3 ... > >>

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

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

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


@see IO.binwrite...

Pathname#utime(atime, mtime) -> Integer (6301.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#atime -> Time (6201.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#binread(*args) -> String | nil (6201.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(2...
...0, 10) # => "ne one\nThis is line "
//}

@see IO.binread...

Pathname#ctime -> Time (6201.0)

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

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

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

I
O.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.cti...

絞り込み条件を変える

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

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

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

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

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

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

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

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

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

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

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

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

I
O.write("tes...
...tfile", "line1\nline2,\nline3\n")
Pathname
("testfile").each_line {|f| p f }

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

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

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

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

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

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

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

@see IO.foreach...

Pathname#mtime -> Time (6201.0)

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

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


@see File.mtime...

Pathname#opendir -> Dir (6201.0)

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

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


@see Dir.open...

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

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

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


@see Dir.open...

絞り込み条件を変える

<< 1 2 3 ... > >>