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.Bits 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 63 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 93 of file File.d. References FileConduit. |
|
Set the file content and length to reflect the given array. Definition at line 115 of file File.d. Referenced by append(). |
|
Append content to the file. Definition at line 126 of file File.d. References write(). |
|
Set the file content and length to reflect the given array. Definition at line 137 of file File.d. References FileConduit. |
|
Return the FilePath associated with this FileProxy Definition at line 152 of file FileProxy.d. References FileProxy::path. |
|
Return the name of the associated path Definition at line 163 of file FileProxy.d. References FileProxy::path, and FilePath::toString(). |
|
Does this path currently exist? Definition at line 174 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 196 of file FileProxy.d. Referenced by FileScan::scanFiles(). |
|
Write this FileProxy to the given IWriter. We just emit the filepath, since that's what we represent. Reimplemented from IWritable. Definition at line 209 of file FileProxy.d. References FileProxy::path. Referenced by UnicodeFile(), and UnicodeFileTemplate(). |