るりまサーチ (Ruby 2.1.0)

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

別のキーワード

  1. _builtin file?
  2. _builtin file
  3. file path
  4. file lstat
  5. file chmod

検索結果

File#truncate(length) -> 0 (81322.0)

ファイルのサイズを最大 length バイトにします。

ファイルのサイズを最大 length バイトにします。

サイズの変更に成功すれば 0 を返します。失敗した場合は例外
Errno::EXXX が発生します。

@raise IOError 自身が書き込み用にオープンされていなければ発生します。

@raise Errno::EXXX サイズの変更に失敗した場合に発生します。

//emlist[例][ruby]{
IO.write("testfile", "1234567890")
File.open("testfile", "a") do |f|
f.truncate(5) # => 0
f.size # => 5...

Shell#cat(*files) -> Shell::Filter (54715.0)

実行すると, それらを内容とする Filter オブジェクトを返します.

実行すると, それらを内容とする Filter オブジェクトを返します.

@param files シェルコマンド cat に与えるファイル名を文字列で指定します。

動作例
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact {
glob("*.txt").to_a.each { |file|
file.chomp!
cat(file).each { |l|
echo(l) | tee(file + ".tee") >> "al...

Shell::CommandProcessor#cat(*files) -> Shell::Filter (54715.0)

実行すると, それらを内容とする Filter オブジェクトを返します.

実行すると, それらを内容とする Filter オブジェクトを返します.

@param files シェルコマンド cat に与えるファイル名を文字列で指定します。

動作例
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact {
glob("*.txt").to_a.each { |file|
file.chomp!
cat(file).each { |l|
echo(l) | tee(file + ".tee") >> "al...

Shell::Filter#cat(*files) -> Shell::Filter (54715.0)

実行すると, それらを内容とする Filter オブジェクトを返します.

実行すると, それらを内容とする Filter オブジェクトを返します.

@param files シェルコマンド cat に与えるファイル名を文字列で指定します。

動作例
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact {
glob("*.txt").to_a.each { |file|
file.chomp!
cat(file).each { |l|
echo(l) | tee(file + ".tee") >> "al...

Gem::Specification#test_suite_file=(file) (27628.0)

この属性は非推奨です。 Gem::Specification#test_files= を使用してください。

この属性は非推奨です。 Gem::Specification#test_files= を使用してください。

@param file テストスイートのファイルを指定します。

絞り込み条件を変える

Gem::Specification#test_file=(file) (27610.0)

Gem::Specification#test_files= の単数バージョンです。

Gem::Specification#test_files= の単数バージョンです。

Gem::Specification#files=(files) (27604.0)

この Gem パッケージに含まれるファイル名の配列をセットします。

この Gem パッケージに含まれるファイル名の配列をセットします。

@param files この Gem パッケージに含まれるファイル名の配列を指定します。

Gem::Specification#test_files=(files) (27604.0)

ユニットテストのファイルのリストをセットします。

ユニットテストのファイルのリストをセットします。

@param files ユニットテストのファイルのリストを指定します。

Gem::Specification#file_name -> String (27307.0)

生成される Gem パッケージの名前を返します。

生成される Gem パッケージの名前を返します。

Gem::Specification#test_file -> String (27307.0)

Gem::Specification#test_files の単数バージョンです。

Gem::Specification#test_files の単数バージョンです。

絞り込み条件を変える

Gem::Specification#test_suite_file -> String (27307.0)

この属性は非推奨です。 Gem::Specification#test_files を使用してください。

この属性は非推奨です。 Gem::Specification#test_files を使用してください。

Gem::Specification#extra_rdoc_files -> [String] (27304.0)

RDoc でドキュメントを作成する際に使用する特別なファイルのリストを返します。

RDoc でドキュメントを作成する際に使用する特別なファイルのリストを返します。

Gem::Specification#extra_rdoc_files=(paths) (27304.0)

RDoc でドキュメントを作成する際に使用する特別なファイルのリストをセットします。

RDoc でドキュメントを作成する際に使用する特別なファイルのリストをセットします。

@param paths RDoc でドキュメントを作成する際に使用する特別なファイルのリストを指定します。

Gem::Specification#files -> [String] (27304.0)

この Gem パッケージに含まれるファイル名の配列を返します。

この Gem パッケージに含まれるファイル名の配列を返します。

Gem::Specification#lib_files -> [String] (27304.0)

この Gem パッケージに含まれているファイルのうち Gem::Specification#require_paths 以下にあるファイルのリストを返します。

この Gem パッケージに含まれているファイルのうち Gem::Specification#require_paths
以下にあるファイルのリストを返します。

絞り込み条件を変える

Gem::Specification#test_files -> [String] (27304.0)

ユニットテストのファイルのリストを返します。

ユニットテストのファイルのリストを返します。

Rake::Application#load_rakefile (27304.0)

Rakefile を探してロードします。

Rakefile を探してロードします。

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

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

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

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

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

CSV#truncate(path, length) -> 0 (18370.0)

File#truncate に委譲します。

File#truncate に委譲します。


@see File#truncate

Pathname#truncate(length) -> 0 (18370.0)

File.truncate(self.to_s, length) と同じです。

File.truncate(self.to_s, length) と同じです。


@param length 変更したいサイズを整数で与えます。

@see File.truncate

絞り込み条件を変える

Shell#truncate(path, length) -> 0 (18370.0)

File クラスにある同名のクラスメソッドと同じです.

File クラスにある同名のクラスメソッドと同じです.

@param path パスを表す文字列を指定します。

@param length 変更したいサイズを整数で与えます。

@see File.truncate

Shell::CommandProcessor#truncate(path, length) -> 0 (18370.0)

File クラスにある同名のクラスメソッドと同じです.

File クラスにある同名のクラスメソッドと同じです.

@param path パスを表す文字列を指定します。

@param length 変更したいサイズを整数で与えます。

@see File.truncate

Shell::Filter#truncate(path, length) -> 0 (18370.0)

File クラスにある同名のクラスメソッドと同じです.

File クラスにある同名のクラスメソッドと同じです.

@param path パスを表す文字列を指定します。

@param length 変更したいサイズを整数で与えます。

@see File.truncate

RDoc::Context#record_location(toplevel) (18352.0)

Record the file that we happen to find it in

Record the file that we happen to find it in

Shell#tee(file) -> Shell::Filter (415.0)

実行すると, それらを内容とする Filter オブジェクトを返します.

実行すると, それらを内容とする Filter オブジェクトを返します.

@param file シェルコマンドtee に与えるファイル名を文字列で指定します。

動作例
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact {
glob("*.txt").to_a.each { |file|
file.chomp!
cat(file).each { |l|
echo(l) | tee(file + ".tee") >> "all...

絞り込み条件を変える

Shell::CommandProcessor#tee(file) -> Shell::Filter (415.0)

実行すると, それらを内容とする Filter オブジェクトを返します.

実行すると, それらを内容とする Filter オブジェクトを返します.

@param file シェルコマンドtee に与えるファイル名を文字列で指定します。

動作例
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact {
glob("*.txt").to_a.each { |file|
file.chomp!
cat(file).each { |l|
echo(l) | tee(file + ".tee") >> "all...

Shell::Filter#tee(file) -> Shell::Filter (415.0)

実行すると, それらを内容とする Filter オブジェクトを返します.

実行すると, それらを内容とする Filter オブジェクトを返します.

@param file シェルコマンドtee に与えるファイル名を文字列で指定します。

動作例
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact {
glob("*.txt").to_a.each { |file|
file.chomp!
cat(file).each { |l|
echo(l) | tee(file + ".tee") >> "all...

Shell#echo(*strings) -> Shell::Filter (94.0)

実行すると, それらを内容とする Filter オブジェクトを返します.

実行すると, それらを内容とする Filter オブジェクトを返します.

@param strings シェルコマンド echo に与える引数を文字列で指定します。

動作例
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact {
glob("*.txt").to_a.each { |file|
file.chomp!
cat(file).each { |l|
echo(l) | tee(file + ".tee") >> "al...

Shell#glob(pattern) -> Shell::Filter (94.0)

実行すると, それらを内容とする Filter オブジェクトを返します.

実行すると, それらを内容とする Filter オブジェクトを返します.

@param pattern シェルコマンド glob に与えるパターンを指定します。
パターンの書式については、Dir.[] を参照してください。

動作例
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact {
glob("*.txt").to_a.each { |file|
file.chomp!
cat(file).each { |l|
...

Shell::CommandProcessor#echo(*strings) -> Shell::Filter (94.0)

実行すると, それらを内容とする Filter オブジェクトを返します.

実行すると, それらを内容とする Filter オブジェクトを返します.

@param strings シェルコマンド echo に与える引数を文字列で指定します。

動作例
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact {
glob("*.txt").to_a.each { |file|
file.chomp!
cat(file).each { |l|
echo(l) | tee(file + ".tee") >> "al...

絞り込み条件を変える

Shell::CommandProcessor#glob(pattern) -> Shell::Filter (94.0)

実行すると, それらを内容とする Filter オブジェクトを返します.

実行すると, それらを内容とする Filter オブジェクトを返します.

@param pattern シェルコマンド glob に与えるパターンを指定します。
パターンの書式については、Dir.[] を参照してください。

動作例
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact {
glob("*.txt").to_a.each { |file|
file.chomp!
cat(file).each { |l|
...

Shell::Filter#echo(*strings) -> Shell::Filter (94.0)

実行すると, それらを内容とする Filter オブジェクトを返します.

実行すると, それらを内容とする Filter オブジェクトを返します.

@param strings シェルコマンド echo に与える引数を文字列で指定します。

動作例
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact {
glob("*.txt").to_a.each { |file|
file.chomp!
cat(file).each { |l|
echo(l) | tee(file + ".tee") >> "al...

Shell::Filter#glob(pattern) -> Shell::Filter (94.0)

実行すると, それらを内容とする Filter オブジェクトを返します.

実行すると, それらを内容とする Filter オブジェクトを返します.

@param pattern シェルコマンド glob に与えるパターンを指定します。
パターンの書式については、Dir.[] を参照してください。

動作例
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact {
glob("*.txt").to_a.each { |file|
file.chomp!
cat(file).each { |l|
...

IO#close_on_exec=(bool) (58.0)

自身に close-on-exec フラグを設定します。

自身に close-on-exec フラグを設定します。

このフラグをセットすると exec(2) 時にそのファイルデスクリプタを
close します。

@see fcntl(2)
@param bool 自身の close-on-exec フラグを true か false で指定します。

f = open("/dev/null")
f.close_on_exec = true
system("cat", "/proc/self/fd/#{f.fileno}") # cat: /proc/self/fd/3: No such file or directory
...