License:
BSD style: see license.txt

Version:
Mar 2005: Initial release

Version:
Feb 2007: No longer a proxy subclass

author:
Kris

  • class File ;
  • A wrapper atop of FileConduit to expose a simpler API. This one returns the entire file content as a void[], and sets the content to reflect a given void[].

    Method read() returns the current content of the file, whilst write() sets the file content, and file length, to the provided array. Method append() adds content to the tail of the file.

    Methods to inspect the file system, check the status of a file or directory and other facilities are made available via the associated path (exposed via the path() method)


  • this(char[] path);
  • Construct a File from a text string

  • this(PathView path);
  • Construct a File from the provided FilePath

  • static File opCall (char[] path);
  • Call-site shortcut to create a File instance. This enables the same syntax as struct usage, so may expose a migration path

  • deprecated final PathView path ();
  • Return the path for this file instance

  • final void[] read ();
  • Return the content of the file.

  • final File write (void[] content);
  • Set the file content and length to reflect the given array.

  • final File append (void[] content);
  • Append content to the file.

    Copyright (c) 2004 Kris Bell. All rights reserved :: page rendered by CandyDoc