System.IOUtils.TFile.WriteAllBytes

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

Delphi

class procedure WriteAllBytes(const Path: string; const Bytes: TBytes); static;

C++

static void __fastcall WriteAllBytes(const System::UnicodeString Path, const System::DynamicArray<System::Byte> Bytes);

プロパティ

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

説明

バイト配列をファイルに書き込みます。

指定のバイト配列をファイルに書き込むには、WriteAllBytes を使用します。Path パラメータで指定したファイルが存在する場合は、そのファイルが上書きされます。存在しない場合は、ファイルが作成されて、指定のバイトが格納されます。このメソッドに必要なパラメータの一覧を以下の表に示します。



名前 意味

Path

ファイルのパス。

Bytes

ファイルに書き込むバイトの配列。



メモ:  ファイルにアクセスできない場合やパスが無効な場合、WriteAllBytes は例外を発生させます。

関連項目