るりまサーチ

最速Rubyリファレンスマニュアル検索!
3289件ヒット [3201-3289件を表示] (0.085秒)
トップページ > クエリ:>[x] > クエリ:dir[x]

別のキーワード

  1. _builtin >
  2. bigdecimal >
  3. module >
  4. float >
  5. integer >

モジュール

キーワード

検索結果

<< < ... 31 32 33 >>

Shell#cwd -> String (101.0)

カレントディレクトリのパスを文字列で返します。

...カレントディレクトリのパスを文字列で返します。

使用例
require 'shell'
sh = Shell.new
p sh.cwd
# 例
#=> "/Users/kouya/tall"...

Shell#getwd -> String (101.0)

カレントディレクトリのパスを文字列で返します。

...カレントディレクトリのパスを文字列で返します。

使用例
require 'shell'
sh = Shell.new
p sh.cwd
# 例
#=> "/Users/kouya/tall"...

Shell#pwd -> String (101.0)

カレントディレクトリのパスを文字列で返します。

...カレントディレクトリのパスを文字列で返します。

使用例
require 'shell'
sh = Shell.new
p sh.cwd
# 例
#=> "/Users/kouya/tall"...

shell (96.0)

Ruby 上で sh/csh のようにコマンドの実行及びフィルタリングを手軽に行うためのライブラリです。

...Example 1:

require 'shell'
sh = Shell.cd("/tmp")
sh.mkdir "shell-test-1" unless sh.exists?("shell-test-1")
sh.cd("shell-test-1")
for dir in ["dir1", "dir3", "dir5"]
unless sh.exists?(dir)
sh.mkdir dir
sh.cd(dir) do
f = sh.open("tmpFile", "w")
f.puts "TEST"...
...require 'shell'
sh = Shell.cd("/tmp")
sh.transact do
mkdir "shell-test-1" unless exists?("shell-test-1")
cd("shell-test-1")
for dir in ["dir1", "dir3", "dir5"]
if !exists?(dir)
mkdir dir
cd(dir) do
f = open("tmpFile", "w")
f.print "TEST\n"...
...shell'
sh = Shell.new
sh.cat("/etc/printcap") | sh.tee("tee1") > "tee2"
(sh.cat < "/etc/printcap") | sh.tee("tee11") > "tee12"
sh.cat("/etc/printcap") | sh.tee("tee1") >> "tee2"
(sh.cat < "/etc/printcap") | sh.tee("tee11") >> "tee12"

==== Example 4:

require 'shell'
sh = Shell.new
p...

NEWS for Ruby 2.5.0 (66.0)

NEWS for Ruby 2.5.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...* Dir
* Dir.glob :base というキーワード引数を追加しました 13056
* Dir.chdir (ブロックなしで呼び出した場合), Dir.open, Dir.new, Dir.mkdir, Dir.rmdir,
Dir
.empty? はGVLを解放するようになりました
* Dir.children を追加 11302
* Dir.e...
...ました 14133

* Numeric
* Numeric#step は > で0と比較できない引数が与えられたときcoerce内部で発生したエラーを隠蔽しないようになりました。
7688
* 数値の比較メソッド(<,<=,>=,>)は、coerceメソッドで発生した例外を隠蔽...
...43

* Range
* Range.new no longer hides exceptions when comparing begin and
end with #<=> and raise a "bad value for range" ArgumentError
but instead lets the exception from the #<=> call go through.
7688

* Regexp
* Onigmo 6.1.3-669ac9997619954c298da971fcfacccf36909d0...

絞り込み条件を変える

ruby 1.8.3 feature (30.0)

ruby 1.8.3 feature *((<ruby 1.8 feature>)) *((<ruby 1.8.2 feature>))

...ruby 1.8.3 feature
*((<ruby 1.8 feature>))
*((<ruby 1.8.2 feature>))

ruby 1.8.2 から ruby 1.8.3 までの変更点です。

掲載方針

*バグ修正の影響も含めて動作が変わるものを収録する。
*単にバグを直しただけのものは収録しない。
*ライブラリ...
...ap4r-1.5.5がruby-1.8.3にbundleされています。
* ((<URL:http://dev.ctor.org/soap4r/wiki/Changes-154>))
* ((<URL:http://dev.ctor.org/soap4r/wiki/Changes-155>))

== 1.8.2 (2004-12-25) -> 1.8.3 (2005-09-21)

=== 2005-09-19
: FileUtils.remove_entry_secure [lib] [new]
: FileUtils.remove_entry...
...=== 2005-07-27
: Dir#each [ruby] [bug]
: Dir#entries [ruby] [bug]

1回メソッドを呼んでしまうと空になるバグを修正しました。

$ ruby-1.8.2 -e '
d = Dir.new("/")
d.entries
p d.entries
'
[]

$ ruby-1.8.3 -e '
d = Dir.new("/")
d.e...

IO (24.0)

基本的な入出力機能のためのクラスです。

...動作します。

例:

f = File.open('t.txt', 'r+:euc-jp')
p f.getc.encoding #=> Encoding::EUC_JP
p f.read(1).encoding #=> Encoding::ASCII_8BIT

====[a:io_encoding] IO のエンコーディングとエンコーディングの変換

IO...
...le1')
p f.getc.encoding #=> Encoding::EUC_JP

例2:

f = File.open('t.txt', 'w+:shift_jis:euc-jp')
f.write "\xB4\xC1\xBB\xFA" # 文字列 "漢字" の EUC-JP リテラル
f.rewind
s = f.read(4)
puts s.dump #=> "\x8A\xBF\x8E\x9A"...
...ンコーディングは暗黙に変換されます(予定)。UNIX では変換されずそのままシステムコールに渡されます。

Dir
.glob, Dir.foreach などが返すファイル名のエンコーディングも同様にプラットフォーム依存です。
UNIX では ASCII-8BIT...

NEWS for Ruby 3.0.0 (24.0)

NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...o keywords.
16166

//emlist[][ruby]{
pr = proc{|*a, **kw| [a, kw]}

pr.call([1])
# 2.7 => [[1], {}]
# 3.0 => [[[1]], {}]

pr.call([1, {a: 1}])
# 2.7 => [[1], {:a=>1}] # and deprecation warning
# 3.0 => a=>1}, {}]
//}

* Arguments forwarding (`...`) now supports leading arguments.
16378

//...
...ENTAL]
* `=>` is added. It can be used like a rightward assignment.
17260
* `in` is changed to return `true` or `false`. 17371

//emlist{
0 => a
p a #=> 0

{b: 0, c: 1} => {b:}
p b #=> 0
//}

//emlist{
# version 3.0
0 in 1 #=> false

# version 2.7
0 in 1 #=> raise NoMatchingP...
...q
* Array#*
* Can be sliced with Enumerator::ArithmeticSequence

//emlist[][ruby]{
dir
ty_data = ['--', 'data1', '--', 'data2', '--', 'data3']
dir
ty_data[(1..).step(2)] # take each second element
# => ["data1", "data2", "data3"]
//}

* Binding
* Binding#eval when called with one argum...

NEWS for Ruby 2.4.0 (18.0)

NEWS for Ruby 2.4.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...m 12217
Enumerable#sum と違って each メソッドに依存しません。

* Comparable
* Comparable#clamp を追加 10594

* Dir
* Dir.empty? を追加 10121

* Enumerable
* Enumerable#chunk ブロックを省略した場合 Enumerator を返すようになりました...
...字として許可しなくなりました 12791

* csv
* liberal_parsing オプションを追加 11839

* ipaddr
* IPAddr#==, IPAddr#<=> で引数のオブジェクトを IPAddr に変換する処理に失敗しても例外が発生しなくなりました
12799

* irb
* Bi...
...場合、
コンパイルエラーになります。
//emlist{
# 0のクラスはInteger
0.class # => Integer
Fixnum # => Integer
Bignum # => Integer

# 以下の2つは同じ
obj.kind_of?(Fixnum)
obj.kind_of?(Integer)

/* Cレベ...

Rake.application=(app) (18.0)

現在の Rake アプリケーションをセットします。

...end

# => #<Rake::Application:0x00005624e6c30eb8
# @default_loader=#<Rake::DefaultLoader:0x00005624e6c30cd8>,
# @imported=[],
# @last_description=nil,
# @loaders=
# {".rb"=>#<Rake::DefaultLoader:0x00005624e6c30bc0>,
# ".rf"=>#<Rake::DefaultLoader:0x00005624e6c30b48>,
#...
...".rake"=>#<Rake::DefaultLoader:0x00005624e6c30a80>},
# @name="rake",
# @options=
# #<OpenStruct always_multitask=false, backtrace=false, build_all=false, dryrun=false, ignore_deprecate=false, ignore_system=false, job_stats=false, load_system=false, nosearch=false, rakelib=["rakelib"]...
...show_tasks=nil, silent=false, suppress_backtrace_pattern=nil, thread_pool_size=20, trace=false, trace_output=#<IO:<STDERR>>, trace_rules=false>,
# @original_dir="/path/to/dir",
# @pending_imports=[],
# @rakefile=nil,
# @rakefiles=["rakefile", "Rakefile", "rakefile.rb", "Rakefile.rb"...

絞り込み条件を変える

rubygems/commands/generate_index_command (12.0)

ある Gem サーバに対するインデックスを作成するためのライブラリです。

...スを作成するためのライブラリです。

Usage: gem generate_index [options]
Options:
-d, --directory=DIRNAME repository base dir containing gems subdir
Common Options:
-h, --help このコマンドのヘルプを表示します...
...:
Generates the index files for a gem server directory
Description:
The generate_index command creates a set of indexes for serving gems
statically. The command expects a 'gems' directory under the path given to
the --directory option. When done, it will generate a set...
...# quick index manifest
quick/<gemname>.gemspec.rz # legacy YAML quick index
file
quick/Marshal.<version>/<gemname>.gemspec.rz # Marshal quick index file
Marshal.<version>
Marshal.<version>.Z # Marshal full index
yaml
yaml....
<< < ... 31 32 33 >>