るりまサーチ

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

別のキーワード

  1. fiddle ruby_free
  2. rbconfig ruby
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

ライブラリ

クラス

モジュール

キーワード

検索結果

Kernel#chmod -> () (18262.0)

ファイルのアクセス権を変更します。

...ファイルのアクセス権を変更します。

Change the mode of each FILE to OCTAL-MODE.

ruby
-run -e chmod -- [OPTION] OCTAL-MODE FILE

-
v 詳細表示

@
see chmod(1)...

File#chmod(mode) -> 0 (18244.0)

ファイルのモードを指定された mode に変更します。

...EXXX が発生し
ます。

@
param mode chmod(2) と同様に整数で指定します。

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

@
raise Errno::EXXX 失敗した場合に発生します。

//emlist[例][ruby]{
f = File.new("out", "w");
f.chmod(0644) #=> 0
//}...

File::Stat#birthtime -> Time (173.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
//}...

File#ctime -> Time (159.0)

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

...返します。状態の変更とは chmod などによるものです。

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

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

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

@
see File#lstat, File#atime, File#mtime...
...pen("testfile") { |f| f.ctime } # => 2017-12-21 22:58:17 +0900
//}

@
see File#lstat, File#atime, File#mtime, File#birthtime...

Kernel#install -> () (155.0)

ファイルをコピーし、その属性を設定します。

...性を設定します。


ruby
-run -e install -- [OPTION] SOURCE DEST

-
p ファイルのアクセス時刻と修正時刻を保持します。
-
m chmod と同じようにファイルのパーミッションを設定します。
-
v 詳細表示

@
see install(1)...

絞り込み条件を変える

File::Stat#ctime -> Time (151.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...

Pathname#ctime -> Time (149.0)

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

....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...