るりまサーチ

最速Rubyリファレンスマニュアル検索!
675件ヒット [601-675件を表示] (0.051秒)
トップページ > クエリ:IO[x] > クエリ:write[x] > クエリ:test[x]

別のキーワード

  1. io popen
  2. io pipe
  3. io readlines
  4. io each
  5. io each_line

ライブラリ

クラス

モジュール

キーワード

検索結果

<< < ... 5 6 7 >>

File#atime -> Time (18.0)

最終アクセス時刻を Time オブジェクトとして返します。

...トとして返します。

@raise IOError 自身が close されている場合に発生します。

@raise Errno::EXXX ファイルの時刻の取得に失敗した場合に発生します。

//emlist[例:][ruby]{
IO
.write("testfile", "test")
File.open("testfile") { |f| f.atime } # => 2017-12-2...

File#ctime -> Time (18.0)

状態が最後に変更された時刻を Time オブジェクトとして返します。状態の変更とは chmod などによるものです。

...どによるものです。

@raise IOError 自身が close されている場合に発生します。

@raise Errno::EXXX ファイルの時刻の取得に失敗した場合に発生します。

//emlist[例:][ruby]{
IO
.write("testfile", "test")
File.open("testfile") { |f| f.ctime } # => 2017-12-2...

File#mtime -> Time (18.0)

最終更新時刻を Time オブジェクトとして返します。

...トとして返します。

@raise IOError 自身が close されている場合に発生します。

@raise Errno::EXXX ファイルの時刻の取得に失敗した場合に発生します。

//emlist[例:][ruby]{
IO
.write("testfile", "test")
File.open("testfile") { |f| f.mtime } # => 2017-12-2...

File.lchmod(mode, *filename) -> Integer (18.0)

File.chmod と同様ですが、シンボリックリンクに関してリンクそのものの モードを変更します。

...発生します。

//emlist[例][ruby]{
IO
.write("testfile", "test")
File.symlink("testfile", "testlink")
File.lstat("testlink").ftype # => "link"
File.lchmod(0744, "testlink")
File.stat("testlink").mode.to_s(8) # => "100644"
File.lstat("testlink").mode.to_s(8) # => "120744"
//}...

File.lchown(owner, group, *filename) -> Integer (18.0)

File#chown と同様ですが、 シンボリックリンクに関してリンクそのもののオーナー、 グループを変更します。

...発生します。

//emlist[例][ruby]{
IO
.write("testfile", "test")
File.symlink("testfile", "testlink")
File.chown(501, -1, "testfile")
File.lstat("testlink").ftype # => "link"
File.lchown(0, -1, "testlink")
File.stat("testlink").uid # => 501
File.lstat("testlink").uid # => 0
//}...

絞り込み条件を変える

File.readlink(path) -> String (18.0)

シンボリックリンクのリンク先のパスを文字列で返します。

...XX 指定された path がシンボリックリンクでない場合や、リンクの読み取りに失敗した場合に発生します。

//emlist[例:][ruby]{
IO
.write("testfile", "test")
File.symlink("testfile", "testlink") # => 0
File.readlink("testlink") # => "testfile"
//}...

Pathname#ctime -> Time (18.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.ct...
<< < ... 5 6 7 >>