155件ヒット
[101-155件を表示]
(0.139秒)
ライブラリ
- ビルトイン (83)
- pathname (24)
- shell (12)
-
shell
/ command-processor (12) -
shell
/ filter (12) - win32ole (12)
クラス
- File (47)
-
File
:: Stat (24) - IO (12)
- Pathname (24)
- Shell (12)
-
Shell
:: CommandProcessor (12) -
Shell
:: Filter (12) -
WIN32OLE
_ VARIABLE (12)
検索結果
先頭5件
-
File
# mtime -> Time (6225.0) -
最終更新時刻を Time オブジェクトとして返します。
...刻を Time オブジェクトとして返します。
@raise IOError 自身が close されている場合に発生します。
@raise Errno::EXXX ファイルの時刻の取得に失敗した場合に発生します。
//emlist[例:][ruby]{
IO.write("testfile", "test")
File.open("testfile") { |......f| f.mtime } # => 2017-12-21 22:58:17 +0900
//}
@see File#lstat, File#atime, File#ctime......f| f.mtime } # => 2017-12-21 22:58:17 +0900
//}
@see File#lstat, File#atime, File#ctime, File#birthtime... -
IO
# stat -> File :: Stat (6225.0) -
ファイルのステータスを含む File::Stat オブジェクトを生成して 返します。
...:Stat オブジェクトを生成して
返します。
@raise Errno::EXXX ステータスの読み込みに失敗した場合に発生します。
@raise IOError 既に close されていた場合に発生します。
//emlist[例][ruby]{
IO.write("testfile", "This is line one\nThis is line two......\n")
File.open("testfile") do |f|
s = f.stat
"%o" % s.mode # => "100644"
s.blksize # => 4096
s.atime # => 2018-03-01 23:19:59 +0900
end
//}
@see File#lstat, File.stat, File.lstat... -
File
# birthtime -> Time (6131.0) -
作成された時刻を Time オブジェクトとして返します。
...た時刻を Time オブジェクトとして返します。
@raise IOError 自身が close されている場合に発生します。
@raise Errno::EXXX ファイルの時刻の取得に失敗した場合に発生します。
@raise NotImplementedError Windows のような birthtime のない......環境で発生します。
File.new("testfile").birthtime #=> Wed Apr 09 08:53:14 CDT 2003
@see File#lstat, File#atime, File#ctime, File#mtime... -
File
:: Stat # birthtime -> Time (6113.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
File.stat("testfile").mtime #=> 2014-02-24 11:19:27 +0900
File.stat("testfile").ctime #=> 2014-02-24 11:19:37 +0900
File.stat("testfile").atime #=> 2014-02-24 11:19:47 +0900
//}... -
WIN32OLE
_ VARIABLE # ole _ type _ detail -> [String] (6113.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_LPWST......E::VARIANTで未定義なので変換できない
UI4 [UI4] type
_ULARGE_INTEGER [USERDEFINED, _ULARGE_INTEGER] cbSize
_FILETIME [USERDEFINED, _FILETIME] mtime
_FILETIME [USERDEFINED, _FILETIME] ctime
_FILETIME [USERDEFINED, _FILETIME] atime
UI4 [UI4] grfMode
UI4 [UI4] grfLocksSupported
GUID......[USERDEFINED, GUID] clsid
UI4 [UI4] grfStateBits
UI4 [UI4] reserved
上例のように、WIN32OLE_VARIABLEで取得できる変数あるいはその元となる構造
体は、必ずしもOLEオートメーション互換データというわけではありません。こ
のようなデータ...