るりまサーチ

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

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method new
  4. irb/input-method gets
  5. matrix -

ライブラリ

クラス

キーワード

検索結果

<< 1 2 > >>

IO.binwrite(path, string, offset=nil) -> Integer (18225.0)

path で指定されるファイルを開き、string を書き込み、 閉じます。

...path で指定されるファイルを開き、string を書き込み、
閉じます。

ファイルを開くときの mode が "rb:ASCII-8BIT" で、バイナリモードが有効
である点以外は IO.write と同じです。

Kernel.#open と同様 path の先頭が "|" ならば、"|" に...
...0d 49 48 44 52

# binwriteを使用した場合: どの環境でも正しく保存できる。
IO.binwrite('white.binmode.png', png)
puts IO.binread('white.binmode.png', 16).unpack('C*').map {|c| '%02x' % c }.join(' ')
# => 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52

# binwriteを使用しな...

Pathname#binwrite(string, offset=nil) -> Integer (18223.0)

IO.binwrite(self.to_s, *args)と同じです。

...IO.binwrite(self.to_s, *args)と同じです。


@see IO.binwrite...

IO.for_fd(fd, mode = "r", **opts) -> IO (106.0)

オープン済みのファイルディスクリプタ fd に対する新しい IO オブジェクトを生成して返します。

...数と同じ意味です
* :external_encoding 外部エンコーディング。"-" はデフォルト外部エンコーディングの
別名です。
* :internal_encoding 内部エンコーディング。"-" はデフォルト内部エンコーディングの
別名です。nilなら変...
...e"))
io.class # => IO
io.close
//}

//emlist[例:IO.for_fd による読み込み・バイナリモードでのファイルオープン][ruby]{
IO.binwrite("testfile", "\xBF\xAA\x16\x04.\b\xCB\x12\xACoeQ\xFDv2\xCF9+\x81\x18")
io = IO.for_fd(IO.sysopen("testfile"), "r", binmode: true)
io.class # => IO...

IO.new(fd, mode = "r", **opts) -> IO (106.0)

オープン済みのファイルディスクリプタ fd に対する新しい IO オブジェクトを生成して返します。

...数と同じ意味です
* :external_encoding 外部エンコーディング。"-" はデフォルト外部エンコーディングの
別名です。
* :internal_encoding 内部エンコーディング。"-" はデフォルト内部エンコーディングの
別名です。nilなら変...
...e"))
io.class # => IO
io.close
//}

//emlist[例:IO.for_fd による読み込み・バイナリモードでのファイルオープン][ruby]{
IO.binwrite("testfile", "\xBF\xAA\x16\x04.\b\xCB\x12\xACoeQ\xFDv2\xCF9+\x81\x18")
io = IO.for_fd(IO.sysopen("testfile"), "r", binmode: true)
io.class # => IO...

IO.open(fd, mode = "r", **opts) -> IO (106.0)

オープン済みのファイルディスクリプタ fd に対する新しい IO オブジェクトを生成して返します。

...数と同じ意味です
* :external_encoding 外部エンコーディング。"-" はデフォルト外部エンコーディングの
別名です。
* :internal_encoding 内部エンコーディング。"-" はデフォルト内部エンコーディングの
別名です。nilなら変...
...e"))
io.class # => IO
io.close
//}

//emlist[例:IO.for_fd による読み込み・バイナリモードでのファイルオープン][ruby]{
IO.binwrite("testfile", "\xBF\xAA\x16\x04.\b\xCB\x12\xACoeQ\xFDv2\xCF9+\x81\x18")
io = IO.for_fd(IO.sysopen("testfile"), "r", binmode: true)
io.class # => IO...

絞り込み条件を変える

IO.open(fd, mode = "r", **opts) {|io| ... } -> object (106.0)

オープン済みのファイルディスクリプタ fd に対する新しい IO オブジェクトを生成して返します。

...数と同じ意味です
* :external_encoding 外部エンコーディング。"-" はデフォルト外部エンコーディングの
別名です。
* :internal_encoding 内部エンコーディング。"-" はデフォルト内部エンコーディングの
別名です。nilなら変...
...e"))
io.class # => IO
io.close
//}

//emlist[例:IO.for_fd による読み込み・バイナリモードでのファイルオープン][ruby]{
IO.binwrite("testfile", "\xBF\xAA\x16\x04.\b\xCB\x12\xACoeQ\xFDv2\xCF9+\x81\x18")
io = IO.for_fd(IO.sysopen("testfile"), "r", binmode: true)
io.class # => IO...

IO.write(path, string, **opts) -> Integer (106.0)

path で指定されるファイルを開き、string を書き込み、 閉じます。

...text) # => 66
IO.write("testfile", "0123456789", 20) #=> 10
IO.read("testfile")
# => "This is line one\nThi0123456789two\nThis is line three\nAnd so on...\n"
IO.write("testfile", "0123456789") #=> 10
IO.read("testfile") # => "0123456789"
//}

@see IO.binwrite...

IO.write(path, string, offset=nil, **opts) -> Integer (106.0)

path で指定されるファイルを開き、string を書き込み、 閉じます。

...text) # => 66
IO.write("testfile", "0123456789", 20) #=> 10
IO.read("testfile")
# => "This is line one\nThi0123456789two\nThis is line three\nAnd so on...\n"
IO.write("testfile", "0123456789") #=> 10
IO.read("testfile") # => "0123456789"
//}

@see IO.binwrite...

NEWS for Ruby 2.1.0 (78.0)

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

...は参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリストは ChangeLog ファイルか bugs.ruby-lang.org の issue を参照してください。

== 2.0.0 以降の変更

=== 言語仕様の変更

* キーワード引数のデフォルト値...
...scrub, String#scrub! 不正なバイト列を検証して修正します。
古いバージョンのRubyと一緒に使いたいときは string-scrub gem を使います。

* Symbol
* 全てのシンボルは freeze されるようになりました

* pack/unpack (Array/String)...
...として取れるようになりました。

* open-uri
* 複数フィールドに同じ名前を使うことをサポートしました (Set-Cookieのように)

* Pathname
* 追加: Pathname#write
* 追加: Pathname#binwrite

* rake
* 10.1.0 に更新しました。古い...

NEWS for Ruby 2.6.0 (78.0)

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

...は参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリストは ChangeLog ファイルか bugs.ruby-lang.org の issue を参照してください。

== 2.5.0 以降の変更

=== 言語仕様の変更

* $SAFE はプロセスグローバルで扱...
...ができます。 12912
典型的なユースケースは以下の通りです:
//emlist{
ary[1..] # ary[1..-1] と同じ
(1...).each {|index| block } # index が 1 から始まる無限ループ
ary.zip(1..) {|elem, index| block } # ar...
...を渡すのは非推奨になる予定で、
今は警告が出ます。 14643

* File
* File.read, File.binread, File.write, File.binwrite,
File.foreach, File.readlines はパスがパイプ文字 '|' で始まっていても
外部コマンドを実行しなくなりまし...

絞り込み条件を変える

<< 1 2 > >>