269件ヒット
[1-100件を表示]
(0.037秒)
種類
- インスタンスメソッド (126)
- 文書 (77)
- 特異メソッド (33)
- モジュール関数 (22)
- ライブラリ (11)
ライブラリ
- ビルトイン (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
. 2 . 0 (10) -
NEWS for Ruby 2
. 7 . 0 (5) -
NEWS for Ruby 3
. 0 . 0 (4) -
NEWS for Ruby 3
. 1 . 0 (3) - 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) - yaml (11)
検索結果
先頭5件
- 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
-
Kernel
. # test(cmd , file) -> bool | Time | Integer | nil (18248.0) -
単体のファイルでファイルテストを行います。
...時刻を返す -> 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... -
Kernel
. # test(cmd , file1 , file2) -> bool (18128.0) -
2ファイル間のファイルテストを行います。
...ァイル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
# => -: fals... -
Shell
# test(command , file1 , file2 = nil) -> bool | Time | Integer | nil (15231.0) -
Kernel.#test や FileTest のメソッドに処理を委譲します。
...Kernel.#test や FileTest のメソッドに処理を委譲します。
@param command 数値、またはサイズが 1 の文字列の場合は Kernel.#test に処理委譲します。
2 文字以上の文字列の場合は FileTest のメソッドとして実行します。
@para......ell'
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 (15231.0) -
Kernel.#test や FileTest のメソッドに処理を委譲します。
...Kernel.#test や FileTest のメソッドに処理を委譲します。
@param command 数値、またはサイズが 1 の文字列の場合は Kernel.#test に処理委譲します。
2 文字以上の文字列の場合は FileTest のメソッドとして実行します。
@para......ell'
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
:: Filter # test(command , file1 , file2 = nil) -> bool | Time | Integer | nil (15231.0) -
Kernel.#test や FileTest のメソッドに処理を委譲します。
...Kernel.#test や FileTest のメソッドに処理を委譲します。
@param command 数値、またはサイズが 1 の文字列の場合は Kernel.#test に処理委譲します。
2 文字以上の文字列の場合は FileTest のメソッドとして実行します。
@para......ell'
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) (9214.0) -
テストの実行開始時刻をセットします。
...テストの実行開始時刻をセットします。
@param time Time オブジェクトを指定します。... -
MiniTest
:: Unit # start _ time -> Time (9202.0) -
テストの実行開始時刻を返します。
テストの実行開始時刻を返します。 -
Rake
:: FileTask # timestamp -> Time | Rake :: LateTime (6313.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 (6223.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 (6223.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......発生します。
//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, File#birthtime... -
File
# mtime -> Time (6223.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 (6207.0) -
状態が最後に変更された時刻を返します。 状態の変更とは chmod などによるものです。
...します。
@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
//}... -
Pathname
# ctime -> Time (6207.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...