System.IOUtils.TFile.ReadAllBytes

提供: RAD Studio API Documentation
移動先: 案内検索

Delphi

class function ReadAllBytes(const Path: string): TBytes; static;

C++

static System::DynamicArray<System::Byte> __fastcall ReadAllBytes(const System::UnicodeString Path);

プロパティ

種類 可視性 ソース ユニット
function public
System.IOUtils.pas
System.IOUtils.hpp
System.IOUtils TFile

説明

ファイルの内容を読み取ってバイト配列に格納します。

バイナリ ファイルの内容を読み取るには ReadAllBytes を使用します。ReadAllBytes は、ファイル データを含む新しいバイト配列を返します。このメソッドに必要なパラメータの一覧を以下の表に示します。



名前 意味

Path

ファイルのパス。



メモ:  ファイルを開けない場合やパスが無効な場合、ReadAllBytes は例外を発生させます。

関連項目