dmd.root.file
    Read a file from disk and store it in memory.
  
License
Source: root/file.d
Documentation: https://dlang.org/phobos/dmd_root_file.html
- 
  DeclarationstructBuffer;Owns a (rmem-managed) buffer. - 
  Declarationpure nothrow @nogc @safe ubyte[]extractSlice();Transfers ownership of the buffer to the caller. 
 
- 
  
- 
  DeclarationstructFile;- 
  DeclarationstructReadResult;- 
  Declarationpure nothrow @nogc @safe ubyte[]extractSlice();Transfers ownership of the buffer to the caller. 
- 
  Declarationpure nothrow @nogc ubyte[]extractDataZ();ditto Include the null-terminator at the end of the buffer in the returned array.
 
- 
  
- 
  Declarationstatic nothrow ReadResultread(const(char)[]name);Read the full content of a file. 
- 
  Declarationstatic nothrow boolwrite(const(char)*name, const void[]data);
 static nothrow boolwrite(const(char)[]name, const void[]data);Write a file, returning trueon success.
- 
  Declarationstatic nothrow voidremove(const(char)*name);Delete a file. 
- 
  Declarationstatic nothrow boolupdate(const(char)*namez, const void[]data);
 static nothrow boolupdate(const(char)[]name, const void[]data);Update file DiscussionIf the file exists and is identical to what is to be written, merely updatethe timestamp on the file. Otherwise, write the file.
 The idea is writes are much slower than reads, and build systems often wind up generating identical files.Parametersconst(char)[]namenameof file toupdatevoid[]dataupdated contents of file Return Valuetrueon success
- 
  Declarationstatic nothrow ulongsize(const char*namez);Size of a file in bytes. Parameterschar*nameznull-terminated filenameReturn Valueulong.maxon any error, the length otherwise.
 
-