英語版
このページの英語版を見る
dmd.root.file
ディスクからファイルを読み込み、メモリに保存する。
Authors:
Walter Bright, https://www.digitalmars.com
License:
ソースroot/file.d
対象範囲 https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/file.d
- struct
Buffer; - (rmem 管理) バッファを所有している。
- pure nothrow @nogc @safe ubyte[]
extractSlice(); - バッファの所有権を呼び出し側に移す。
- struct
File; -
- struct
ReadResult; -
- pure nothrow @nogc @safe ubyte[]
extractSlice(); - バッファの所有権を呼び出し側に移す。
- pure nothrow @nogc ubyte[]
extractDataZ(); - 同上 返される配列のバッファの末尾にヌル終端文字を含める。
- static nothrow bool
read(const char[]name, ref OutBufferbuffer); - ファイルの全内容を読み込み、それを末尾に追加する。
bufferParameters: ファイル名にchar[] nameファイル名 OutBuffer bufferファイルの内容が追加される Returns: false = 成功、true = 失敗false = 成功、true = 失敗 - static nothrow bool
write(const(char)*name, const void[]data);
static nothrow boolwrite(const(char)[]name, const void[]data); - ファイルを書き込む。成功した場合、true を返す。
- static nothrow void
remove(const(char)*name); - ファイルを削除する。
- static nothrow bool
update(const(char)*namez, const void[]data);
static nothrow boolupdate(const(char)[]name, const void[]data); - ファイルを更新するファイルが存在し、書き込む内容と同一である場合は、 単にファイルのタイムスタンプを更新する。 そうでない場合は、ファイルを書き込む。 書き込みは読み込みよりもはるかに遅いという考え方であり、ビルドシステムは しばしば同一のファイルを生成してしまう。Parameters:
const(char)[] name更新するファイルの名前 void[] dataファイルの更新内容 Returns:true 成功した場合 - static nothrow ulong
size(const char*namez); - ファイルのサイズ(バイト単位)。Parameters:
char* namezヌル文字で終端するファイル名 Returns:ulong.max エラーが発生した場合はnull終端のファイル名、それ以外は長さ。
Copyright © 1999-2025 by the D Language Foundation
DEEPL APIにより翻訳、ところどころ修正。
このページの最新版(英語)
このページの原文(英語)
翻訳時のdmdのバージョン: 2.109.1
サイト全体のドキュメントのdmdのバージョン: 2.109.1
最新のdmdのバージョン: 2.111.0 ダウンロード
翻訳日付:
HTML生成日時:
編集者: dokutoku