Inheritance diagram for File:
Public Member Functions | |
this (char[] path) | |
this (FilePath path) | |
void[] | read () |
File | write (void[] content) |
File | append (void[] content) |
Private Member Functions | |
File | write (void[] content, FileStyle style) |
FilePath | getPath () |
char[] | toString () |
bool | isExisting () |
FilePath[] | toList () |
void | write (IWriter emit) |
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 FileProxy superclass.
Definition at line 62 of file File.d.
|
Construct a File from a text string Reimplemented from FileProxy. |
|
Construct a File from the provided FilePath Reimplemented from FileProxy. |
|
Return the content of the file. Definition at line 92 of file File.d. References FileConduit, and FileConduit::length(). |
|
Set the file content and length to reflect the given array. Definition at line 110 of file File.d. Referenced by append(). |
|
Append content to the file. Definition at line 121 of file File.d. References write(). |
|
Set the file content and length to reflect the given array. Definition at line 132 of file File.d. References FileConduit. |
|
Return the FilePath associated with this FileProxy Definition at line 153 of file FileProxy.d. References FileProxy::path. Referenced by testFileSize(), and testScanFiles(). |
|
Return the name of the associated path Definition at line 164 of file FileProxy.d. References FileProxy::path, and FilePath::toString(). |
|
Does this path currently exist? Definition at line 175 of file FileProxy.d. |
|
List the files contained within the associated path:
FileProxy proxy = new FileProxy ("."); foreach (FilePath path; proxy.toList()) Stdout.put(path).cr(); Definition at line 197 of file FileProxy.d. Referenced by FileScan::scanFiles(), testFileList(), and testScanFiles(). |
|
Write this FileProxy to the given IWriter. We just emit the filepath, since that's what we represent. Reimplemented from IWritable. Definition at line 211 of file FileProxy.d. References FileProxy::path. |