245件ヒット
[1-100件を表示]
(0.126秒)
種類
- インスタンスメソッド (126)
- 文書 (64)
- 特異メソッド (33)
- モジュール関数 (22)
ライブラリ
- ビルトイン (66)
- csv (11)
- logger (33)
-
minitest
/ unit (2) - pathname (11)
- rake (11)
- shell (12)
-
shell
/ command-processor (12) -
shell
/ filter (12) - win32ole (11)
クラス
- CSV (11)
- File (44)
- Logger (33)
-
MiniTest
:: Unit (2) - Pathname (11)
-
Rake
:: FileTask (11) - Shell (12)
-
Shell
:: CommandProcessor (12) -
Shell
:: Filter (12) -
WIN32OLE
_ VARIANT (11)
モジュール
- Kernel (22)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) -
NEWS for Ruby 2
. 7 . 0 (5) -
NEWS for Ruby 3
. 0 . 0 (4) - Ruby用語集 (11)
- [] (18)
- atime (11)
- ctime (33)
-
datetime
_ format (11) -
datetime
_ format= (11) - formatter (11)
- mtime (11)
- new (22)
-
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 2 feature (11) -
ruby 1
. 8 . 3 feature (11) -
start
_ time (1) -
start
_ time= (1)
検索結果
先頭5件
- Shell
:: Filter # test(command , file1 , file2 = nil) -> bool | Time | Integer | nil - Kernel
. # test(cmd , file) -> bool | Time | Integer | nil - Kernel
. # test(cmd , file1 , file2) -> bool - Shell
# test(command , file1 , file2 = nil) -> bool | Time | Integer | nil - Shell
:: CommandProcessor # test(command , file1 , file2 = nil) -> bool | Time | Integer | nil
-
Shell
:: Filter # test(command , file1 , file2 = nil) -> bool | Time | Integer | nil (18631.0) -
Kernel.#test や FileTest のメソッドに処理を委譲します。
...l.#test や FileTest のメソッドに処理を委譲します。
@param command 数値、またはサイズが 1 の文字列の場合は Kernel.#test に処理委譲します。
2 文字以上の文字列の場合は FileTest のメソッドとして実行します。
@param file......@param file2 文字列でファイルへのパスを指定します。
require 'shell'
Shell.verbose = false
sh = Shell.new
begin
sh.mkdir("foo")
rescue
end
p sh[?e, "foo"] # => true
p sh[:e, "foo"] # => true
p sh["e", "foo"] # => true
p sh[:exists?, "......foo"] # => true
p sh["exists?", "foo"] # => true
@see Kernel.#test, FileTest... -
Kernel
. # test(cmd , file) -> bool | Time | Integer | nil (18448.0) -
単体のファイルでファイルテストを行います。
...値
です。文字列の場合はその先頭の文字だけをコマンドとみなします。
@param file テストするファイルのパスを表す文字列か IO オブジェクトを指定します。
@return 下表に特に明記していないものは、真偽値を返しま......: ?u
ファイルに setuid ビットがセットされている
: ?g
ファイルに setgid ビットがセットされている
: ?k
ファイルに sticky ビットがセットされている
: ?M
ファイルの最終更新時刻を返す -> Time
: ?A
ファイルの最終......アクセス時刻を返す -> Time
: ?C
ファイルの inode 変更時刻を返す -> Time
//emlist[例][ruby]{
IO.write("testfile", "test")
test("r", "testfile") # => true
test("s", "testfile") # => 4
test("M", "testfile") # => 2018-03-31 07:38:40 +0900
//}... -
Kernel
. # test(cmd , file1 , file2) -> bool (18328.0) -
2ファイル間のファイルテストを行います。
...の文字だけをコマンドとみなします。
@param file1 テストするファイルのパスを表す文字列か IO オブジェクトを指定します。
@param file2 テストするファイルのパスを表す文字列か IO オブジェクトを指定します。
@return 真偽値を......: ?-
ファイル1とファイル2が同一のファイルである
//emlist[例][ruby]{
IO.write("testfile1", "test1")
IO.write("testfile2", "test2")
%w(= < > -).each do |e|
result = test(e, "testfile1", "testfile2")
puts "#{e}: #{result}"
end
//}
# => =: true
# => <: false
# => >: false... -
Shell
# test(command , file1 , file2 = nil) -> bool | Time | Integer | nil (15631.0) -
Kernel.#test や FileTest のメソッドに処理を委譲します。
...l.#test や FileTest のメソッドに処理を委譲します。
@param command 数値、またはサイズが 1 の文字列の場合は Kernel.#test に処理委譲します。
2 文字以上の文字列の場合は FileTest のメソッドとして実行します。
@param file......@param file2 文字列でファイルへのパスを指定します。
require 'shell'
Shell.verbose = false
sh = Shell.new
begin
sh.mkdir("foo")
rescue
end
p sh[?e, "foo"] # => true
p sh[:e, "foo"] # => true
p sh["e", "foo"] # => true
p sh[:exists?, "......foo"] # => true
p sh["exists?", "foo"] # => true
@see Kernel.#test, FileTest... -
Shell
:: CommandProcessor # test(command , file1 , file2 = nil) -> bool | Time | Integer | nil (15631.0) -
Kernel.#test や FileTest のメソッドに処理を委譲します。
...l.#test や FileTest のメソッドに処理を委譲します。
@param command 数値、またはサイズが 1 の文字列の場合は Kernel.#test に処理委譲します。
2 文字以上の文字列の場合は FileTest のメソッドとして実行します。
@param file......@param file2 文字列でファイルへのパスを指定します。
require 'shell'
Shell.verbose = false
sh = Shell.new
begin
sh.mkdir("foo")
rescue
end
p sh[?e, "foo"] # => true
p sh[:e, "foo"] # => true
p sh["e", "foo"] # => true
p sh[:exists?, "......foo"] # => true
p sh["exists?", "foo"] # => true
@see Kernel.#test, FileTest... -
MiniTest
:: Unit # start _ time=(time) (15414.0) -
テストの実行開始時刻をセットします。
...テストの実行開始時刻をセットします。
@param time Time オブジェクトを指定します。... -
MiniTest
:: Unit # start _ time -> Time (15402.0) -
テストの実行開始時刻を返します。
テストの実行開始時刻を返します。 -
Rake
:: FileTask # timestamp -> Time | Rake :: LateTime (12613.0) -
ファイルタスクのタイムスタンプを返します。
...ファイルタスクのタイムスタンプを返します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: "test.txt"
file "test.txt" do |task|
Rake.application.options.build_all = false
task.timestamp # => #<Rake::LateTime:0x2ba58f0>
end
//}... -
File
# atime -> Time (12423.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......f| f.atime } # => 2017-12-21 22:58:17 +0900
//}
@see File#lstat, File#ctime, File#mtime, File#birthtime... -
File
# ctime -> Time (12423.0) -
状態が最後に変更された時刻を Time オブジェクトとして返します。状態の変更とは chmod などによるものです。
... Time オブジェクトとして返します。状態の変更とは 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.......write("testfile", "test")
File.open("testfile") { |f| f.ctime } # => 2017-12-21 22:58:17 +0900
//}
@see File#lstat, File#atime, File#mtime, File#birthtime... -
File
# mtime -> Time (12423.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... -
File
. ctime(filename) -> Time (12407.0) -
状態が最後に変更された時刻を返します。 状態の変更とは chmod などによるものです。
...aram filename ファイル名を表す文字列か IO オブジェクトを指定します。
@raise Errno::EXXX ファイルの時刻の取得に失敗した場合に発生します。
//emlist[例:][ruby]{
IO.write("testfile", "test")
File.ctime("testfile") # => 2017-11-30 22:40:49 +0900
File.ch......mod(0755, "testfile")
File.ctime("testfile") # => 2017-11-30 22:42:12 +0900
//}... -
Pathname
# ctime -> Time (12407.0) -
File.ctime(self.to_s) を渡したものと同じです。
...ile.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.cti...