るりまサーチ

最速Rubyリファレンスマニュアル検索!
40件ヒット [1-40件を表示] (0.035秒)
トップページ > クエリ:Dir[x] > クエリ:shell[x] > クエリ:open[x]

別のキーワード

  1. dir open
  2. dir chdir
  3. dir foreach
  4. dir each_child
  5. rake original_dir

検索結果

shell (38180.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...
...==== Example 2:

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")...
...re '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...

Shell#open(path, mode) -> File | Dir (35268.0)

path がファイルなら、 File.open path がディレクトリなら、 Dir.open の動作をします。

...がファイルなら、 File.open path がディレクトリなら、 Dir.open の動作をします。

@param path 開きたいパスを指定します。

@param mode アクセスモードを指定します。path がディレクトリの場合は無視されます。

@see File.open, Dir.open...

Shell::CommandProcessor#open(path, mode) -> File | Dir (21268.0)

path がファイルなら、 File.open path がディレクトリなら、 Dir.open の動作をします。

...がファイルなら、 File.open path がディレクトリなら、 Dir.open の動作をします。

@param path 開きたいパスを指定します。

@param mode アクセスモードを指定します。path がディレクトリの場合は無視されます。

@see File.open, Dir.open...

Shell::Filter#open(path, mode) -> File | Dir (21268.0)

path がファイルなら、 File.open path がディレクトリなら、 Dir.open の動作をします。

...がファイルなら、 File.open path がディレクトリなら、 Dir.open の動作をします。

@param path 開きたいパスを指定します。

@param mode アクセスモードを指定します。path がディレクトリの場合は無視されます。

@see File.open, Dir.open...

ruby 1.6 feature (180.0)

ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。

...(2002-07-30) [i586-linux]
["a", "b", "c"]

: 2002-06-15 Dir.glob

リンクの切れたシンボリックリンクに対して、Dir.glob がマッチしません
でした。

File.symlink("foo", "bar")
p Dir.glob("bar")
=> ruby 1.6.7 (2002-03-01) [i586-linux]...
...dev:17155>))

open
("|-","r+") {|f|
if f
f.dup.close_write
else
sleep 1
end
}

=> ruby 1.6.7 (2002-03-01) [i586-linux]
-:3:in `close_write': closing non-duplex IO for writing (IOError)
from -:3
from -:1:in `open'...
...ify frozen string (TypeError)

%w(foo bar bar baz).uniq[0].upcase!
=> -:1:in `upcase!': can't modify frozen string (TypeError)

: ((<shell>))

shell
0.6 が標準ライブラリとして新規に追加されました。
(ドキュメントが doc ディレクトリにあります)

:...

絞り込み条件を変える

NEWS for Ruby 2.7.0 (66.0)

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

...されました。
その結果、「0 <=> 0i」がNoMethodErrorを発生しなくなりました。 15857

* Dir
* 変更されたメソッド
* Dir.globとDir.[] がNUL文字区切りのグロブパターンを受け付けなくなりました。
代わりにArrayを...
...Name Indication (SNI) のサポートが追加されました。 15594

* open-uri
* Kernelモジュールでopen-uriのopenメソッドを使うと警告されるようになりました。
代わりにURI.openを使ってください。 15893
* メディアタイプ "text/*" の...
...機能を使う場合は対応する gem をインストールしてください。
* CMath (cmath gem)
* Scanf (scanf gem)
* Shell (shell gem)
* Synchronizer (sync gem)
* ThreadsWait (thwait gem)
* E2MM (e2mmap gem)

* Proc
* Proc#to_sの形式が変更さ...