るりまサーチ

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

別のキーワード

  1. _builtin file?
  2. _builtin file
  3. file open
  4. file path
  5. file size

ライブラリ

モジュール

キーワード

検索結果

<< < ... 2 3 4 5 6 ... > >>

IO#fileno -> Integer (6107.0)

ファイル記述子を表す整数を返します。

...ファイル記述子を表す整数を返します。

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


//emlist[例][ruby]{
$stdin.fileno # => 0
$stdout.fileno # => 1
//}...
...ファイル記述子を表す整数を返します。

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


//emlist[例][ruby]{
$stdin.fileno # => 0
$stdout.fileno # => 1
//}

@see Dir#fileno...

Pathname#each_filename {|v| ... } -> nil (6107.0)

self のパス名要素毎にブロックを実行します。

...self のパス名要素毎にブロックを実行します。

//emlist[例][ruby]{
require 'pathname'

Pathname.new("/foo/../bar").each_filename {|v| p v}

# => "foo"
# ".."
# "bar"
//}...

Rake::Application#rakefile -> String (6107.0)

実際に使用されている Rakefile の名前を返します。

...実際に使用されている Rakefile の名前を返します。

//emlist[][ruby]{
# Rakefile での記載例とする

task default: :test_rake_app
task :test_rake_app do
Rake.application.rakefile # => "Rakefile"
end
//}...

WIN32OLE_TYPE#helpfile -> String | nil (6107.0)

オブジェクトに関連付けられたヘルプファイルのフルパス名。

...を返します。

tobj = WIN32OLE_TYPE.new('Microsoft Excel 14.0 Object Library', 'Worksheet')
puts tobj.helpfile # => C:\...\VBAXL9.CHM
WIN32OLE.ole_show_help tobj.helpfile, tobj.helpcontext
# 注)WIN32OLE.ole_show_help(tobj) の呼び出しが望ましい

当メソッドがフル...
...てい
ない場合があることに注意してください。

また、返送値はOLEサーバの登録値をそのまま利用するため、Rubyのパス名形式
(ディレクトリ区切りは「/」)ではなく、Windowsのパス名形式(ディレクト
リ区切りは「\」)で...

Rake::FileList#excluded_from_list?(file_name) -> bool (3138.0)

与えられたファイル名が除外される場合は、真を返します。 そうでない場合は偽を返します。

...す。

@param file_name ファイル名を指定します。

//emlist[][ruby]{
# Rakefile での記載例とする

IO.write("test1.rb", "test")
IO.write("test2.rb", "test")

task default: :test_rake_app
task :test_rake_app do
file
_list = FileList.new("test1.rb", "test2.rb")
file
_list.exclude(...
..."test1.rb")
file_list.excluded_from_list?("test1.rb") # => true
file
_list.excluded_from_list?("test2.rb") # => false
end
//}...

絞り込み条件を変える

Rake::FileList#egrep(pattern) {|filename, count, line| ... } (3125.0)

与えられたパターンをファイルリストから grep のように検索します。

...[ruby]{
# Rakefile での記載例とする

IO.write("sample1", "line1\nline2\nline3\n")
IO.write("sample2", "line1\nline2\nline3\nline4\n")

task default: :test_rake_app
task :test_rake_app do

file
_list = FileList.new('sample*')
file
_list.egrep(/line/) # => 7

file
_list.egrep(/.*/) do |file...
..."filename = #{filename}, count = #{count}, line = #{line}"
end
end

# => "filename = sample1, count = 1, line = line1\n"
# => "filename = sample1, count = 2, line = line2\n"
# => "filename = sample1, count = 3, line = line3\n"
# => "filename = sample2, count = 1, line = line1\n"
# => "filename...
...= sample2, count = 2, line = line2\n"
# => "filename = sample2, count = 3, line = line3\n"
# => "filename = sample2, count = 4, line = line4\n"
//}...

Rake::FileList#existing -> Rake::FileList (3119.0)

自身に含まれるファイルのうちファイルシステムに存在するファイルのみを 含む Rake::FileList を返します。

...
含む Rake::FileList を返します。

//emlist[][ruby]{
# Rakefile での記載例とする

IO.write("test1.rb", "test")
IO.write("test2.rb", "test")

task default: :test_rake_app
task :test_rake_app do
file
_list = FileList.new("test1.rb", "test2.rb", "test3.rb")
file
_list.existing # =>...

Rake::FileList#ext(newext = &#39;&#39;) -> Rake::FileList (3119.0)

各要素に String#ext を適用した新しい Rake::FileList を返します。

...新しい Rake::FileList を返します。

//emlist[][ruby]{
# Rakefile での記載例とする

IO.write("test1.rb", "test")
IO.write("test2.rb", "test")

task default: :test_rake_app
task :test_rake_app do
file
_list = FileList.new("test1.rb", "test2.rb", "test3.rb")
file
_list.ext(".erb") #...

Rake::FileList#pathmap(spec = nil) -> Rake::FileList (3119.0)

各要素に String#pathmap を適用した新しい Rake::FileList を返します。

...String#pathmap を適用した新しい Rake::FileList を返します。

//emlist[][ruby]{
# Rakefile での記載例とする

task default: :test_rake_app
task :test_rake_app do
file
_list = FileList.new("test1.rb", "test2.rb", "test3.rb")
file
_list.pathmap("%n") # => ["test1", "test2", "tes...
<< < ... 2 3 4 5 6 ... > >>