るりまサーチ (Ruby 2.2.0)

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

別のキーワード

  1. _builtin to_a
  2. matrix to_a
  3. to_a
  4. dbm to_a
  5. argf.class to_a

ライブラリ

キーワード

検索結果

Shell::CommandProcessor#ctime(filename) -> Time (63625.0)

File クラスにある同名のクラスメソッドと同じです.

File クラスにある同名のクラスメソッドと同じです.

@param filename ファイル名を表す文字列か IO オブジェクトを指定します。

@see File.ctime

Pathname#ctime -> Time (63409.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

File::Stat#ctime -> Time (63325.0)

最終状態変更時刻を返します。 (状態の変更とは chmod などによるもので、Unix では i-node の変更を意味します)

最終状態変更時刻を返します。
(状態の変更とは chmod などによるもので、Unix では i-node の変更を意味します)

//emlist[][ruby]{
fs = File::Stat.new($0)
#例
p fs.ctime.to_f #=> 1188719843.0
//}


@see Time

Time#ctime -> String (63325.0)

時刻を asctime(3) の形式の文字列に変換します。た だし、末尾の改行文字 "\n" は含まれません。

時刻を asctime(3) の形式の文字列に変換します。た
だし、末尾の改行文字 "\n" は含まれません。

戻り値の文字エンコーディングは Encoding::US_ASCII です。

//emlist[][ruby]{
p Time.local(2000).asctime # => "Sat Jan 1 00:00:00 2000"
p Time.local(2000).asctime.encoding # => #<Encoding:US-ASCII>
p Time.local(2000).ctime # => "Sat Ja...

Date#ctime -> String (63307.0)

asctime(3) 書式の文字列を返します (ただし、末尾の "\n\0" は除く)。

asctime(3) 書式の文字列を返します (ただし、末尾の "\n\0" は除く)。

絞り込み条件を変える

Shell#ctime(filename) -> Time (54625.0)

File クラスにある同名のクラスメソッドと同じです.

File クラスにある同名のクラスメソッドと同じです.

@param filename ファイル名を表す文字列か IO オブジェクトを指定します。

@see File.ctime

Shell::Filter#ctime(filename) -> Time (54625.0)

File クラスにある同名のクラスメソッドと同じです.

File クラスにある同名のクラスメソッドと同じです.

@param filename ファイル名を表す文字列か IO オブジェクトを指定します。

@see File.ctime

Time#asctime -> String (36625.0)

時刻を asctime(3) の形式の文字列に変換します。た だし、末尾の改行文字 "\n" は含まれません。

時刻を asctime(3) の形式の文字列に変換します。た
だし、末尾の改行文字 "\n" は含まれません。

戻り値の文字エンコーディングは Encoding::US_ASCII です。

//emlist[][ruby]{
p Time.local(2000).asctime # => "Sat Jan 1 00:00:00 2000"
p Time.local(2000).asctime.encoding # => #<Encoding:US-ASCII>
p Time.local(2000).ctime # => "Sat Ja...

Date#asctime -> String (36607.0)

asctime(3) 書式の文字列を返します (ただし、末尾の "\n\0" は除く)。

asctime(3) 書式の文字列を返します (ただし、末尾の "\n\0" は除く)。

File#atime -> Time (18322.0)

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

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

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

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

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

@see File#lstat, File#ctime, File#mtime, File#birthtime

絞り込み条件を変える

WIN32OLE_VARIABLE#ole_type_detail -> [String] (18322.0)

変数の型と属性を取得します。

変数の型と属性を取得します。

@return 変数の型と属性を文字列配列で返します。

tobj = WIN32OLE_TYPE.new('Microsoft XML, v5.0', 'tagSTATSTG')
tobj.variables.each do |v|
puts "#{v.ole_type} [#{v.ole_type_detail.join(', ')}] #{v.name}"
end

出力結果

Unknown Type 31 [] pwcsName # => VT_LPWSTR はWIN32OLE::VARIANTで未定義なので変換でき...

File::Stat#birthtime -> Time (9022.0)

作成された時刻を返します。

作成された時刻を返します。

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

//emlist[][ruby]{
File.write("testfile", "foo")
sleep 10
File.write("testfile", "bar")
sleep 10
File.chmod(0644, "testfile")
sleep 10
File.read("testfile")
File.stat("testfile").birthtime #=> 2014-02-24 11:19:17 +0900...