ライブラリ
- ビルトイン (154)
- fileutils (33)
- pathname (33)
- shell (6)
-
shell
/ command-processor (6) -
shell
/ filter (6) - timeout (19)
- un (11)
クラス
- File (55)
-
File
:: Stat (22) - Pathname (33)
- Shell (6)
-
Shell
:: CommandProcessor (6) -
Shell
:: Filter (6)
キーワード
-
NEWS for Ruby 2
. 5 . 0 (7) - Stat (11)
- Win32ネイティブ版Rubyの互換性問題 (11)
- birthtime (11)
- chmod (73)
-
chmod
_ R (11) - commands (11)
- ctime (44)
-
executable
_ real? (11) - lchmod (22)
- readable? (11)
-
ruby 1
. 8 . 3 feature (11) - setgid? (11)
- setuid? (11)
- sticky? (11)
- timeout (19)
- un (11)
- writable? (11)
- セキュリティモデル (2)
検索結果
先頭5件
-
File
. chmod(mode , *filename) -> Integer (62207.0) -
ファイルのモードを mode に変更します。モードを変更したファイ ルの数を返します。
...モードを mode に変更します。モードを変更したファイ
ルの数を返します。
@param filename ファイル名を表す文字列を指定します。
@param mode chmod(2) と同様に整数で指定します。
@raise Errno::EXXX モードの変更に失敗した場合に発... -
File
# chmod(mode) -> 0 (39119.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
. lchmod(mode , *filename) -> Integer (27284.0) -
File.chmod と同様ですが、シンボリックリンクに関してリンクそのものの モードを変更します。
...
File.chmod と同様ですが、シンボリックリンクに関してリンクそのものの
モードを変更します。
@param filename ファイル名を表す文字列を指定します。
@param mode chmod(2) と同様に整数で指定します。
@raise NotImplementedError lchmod(2)......生します。
//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
. ctime(filename) -> Time (21146.0) -
状態が最後に変更された時刻を返します。 状態の変更とは chmod などによるものです。
... chmod などによるものです。
@param filename ファイル名を表す文字列か IO オブジェクトを指定します。
@raise Errno::EXXX ファイルの時刻の取得に失敗した場合に発生します。
//emlist[例:][ruby]{
IO.write("testfile", "test")
File.ctime("testfile......") # => 2017-11-30 22:40:49 +0900
File.chmod(0755, "testfile")
File.ctime("testfile") # => 2017-11-30 22:42:12 +0900
//}... -
FileUtils
. # chmod(mode , list , options = {}) -> Array (21137.0) -
ファイル list のパーミッションを mode に変更します。
...c:FileUtils#options
@return list を配列として返します。
//emlist[][ruby]{
# Absolute mode
require 'fileutils'
FileUtils.chmod(0644, %w(my.rb your.rb his.rb her.rb))
FileUtils.chmod(0755, 'somecommand')
FileUtils.chmod(0755, '/usr/bin/ruby', verbose: true)
# Symbolic mode
require 'fileut......ils'
FileUtils.chmod("u=wr,go=rr", %w(my.rb your.rb his.rb her.rb))
FileUtils.chmod("u=wrx,go=rx", 'somecommand')
FileUtils.chmod("u=wrx,go=rx", '/usr/bin/ruby', verbose: true)
//}
symbolic mode では以下の指定を 操作対象 演算子 権限 の順番で指定します。
操作対象(複... -
File
# ctime -> Time (21046.0) -
状態が最後に変更された時刻を Time オブジェクトとして返します。状態の変更とは chmod などによるものです。
...変更とは chmod などによるものです。
@raise IOError 自身が close されている場合に発生します。
@raise Errno::EXXX ファイルの時刻の取得に失敗した場合に発生します。
//emlist[例:][ruby]{
IO.write("testfile", "test")
File.open("testfile") { |f| f.......ctime } # => 2017-12-21 22:58:17 +0900
//}
@see File#lstat, File#atime, File#mtime......ctime } # => 2017-12-21 22:58:17 +0900
//}
@see File#lstat, File#atime, File#mtime, File#birthtime... -
Shell
# chmod(mode , *filename) -> Integer (18241.0) -
File クラスにある同名のクラスメソッドと同じです.
...
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@param mode chmod(2) と同様に整数で指定します。
@see File.chmod... -
Shell
:: CommandProcessor # chmod(mode , *filename) -> Integer (18241.0) -
File クラスにある同名のクラスメソッドと同じです.
...
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@param mode chmod(2) と同様に整数で指定します。
@see File.chmod... -
Shell
:: Filter # chmod(mode , *filename) -> Integer (18241.0) -
File クラスにある同名のクラスメソッドと同じです.
...
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@param mode chmod(2) と同様に整数で指定します。
@see File.chmod... -
Pathname
# chmod(mode) -> Integer (18167.0) -
File.chmod(mode, self.to_s) と同じです。
...File.chmod(mode, self.to_s) と同じです。
@param mode ファイルのアクセス権限を整数で指定します。
@see File.chmod... -
Kernel
# chmod -> () (18125.0) -
ファイルのアクセス権を変更します。
...ファイルのアクセス権を変更します。
Change the mode of each FILE to OCTAL-MODE.
ruby -run -e chmod -- [OPTION] OCTAL-MODE FILE
-v 詳細表示
@see chmod(1)...