Elm  2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
FileOutput Class Reference

#include <elm/io/FileOutput.h>

+ Inheritance diagram for FileOutput:

Public Member Functions

 FileOutput (const char *path, bool append=false)
 
 FileOutput (cstring path, bool append=false)
 
 FileOutput (string path, bool append=false)
 
 FileOutput (sys::Path path, bool append=false)
 
 FileOutput (FileOutput &&fo)
 
 ~FileOutput (void)
 
- Public Member Functions inherited from Output
 Output (void)
 
 Output (OutStream &stream)
 
OutStreamstream (void) const
 
void setStream (OutStream &stream)
 
void flush (void)
 
void print (bool value)
 
void print (char chr)
 
void print (double value)
 
void print (void *value)
 
void print (const char *str)
 
void print (const CString str)
 
void print (const String &str)
 
void print (const IntFormat &fmt)
 
void print (const FloatFormat &fmt)
 
void print (const StringFormat &fmt)
 
void format (CString fmt,...)
 
void format (CString fmt, VarArg &args)
 
bool supportsANSI ()
 
void print (t::int32 value)
 
void print (t::uint32 value)
 
void print (t::int64 value)
 
void print (t::uint64 value)
 

Detailed Description

Shortcut to build an output to an opened file. Notice that the created file overwrite any existing file.

Constructor & Destructor Documentation

◆ FileOutput() [1/5]

FileOutput ( const char *  path,
bool  append = false 
)

Build a formatted output which stream is the opened corresponding to the given path. If the file already exists, it is overwritten.

Parameters
pathPath of the file to write to.
appendInstead of overwriting, append to the written file (optional).
Exceptions
sys::SystemExceptionIf the file can not be opened.

◆ FileOutput() [2/5]

FileOutput ( cstring  path,
bool  append = false 
)

Build a formatted output which stream is the opened corresponding to the given path. If the file already exists, it is overwritten.

Parameters
pathPath of the file to write to.
appendInstead of overwriting, append to the written file (optional).
Exceptions
sys::SystemExceptionIf the file can not be opened.

◆ FileOutput() [3/5]

FileOutput ( string  path,
bool  append = false 
)

Build a formatted output which stream is the opened corresponding to the given path. If the file already exists, it is overwritten.

Parameters
pathPath of the file to write to.
appendInstead of overwriting, append to the written file (optional).
Exceptions
sys::SystemExceptionIf the file can not be opened.

◆ FileOutput() [4/5]

FileOutput ( sys::Path  path,
bool  append = false 
)

Build a formatted output which stream is the opened corresponding to the given path. If the file already exists, it is overwritten.

Parameters
pathPath of the file to write to.
appendInstead of overwriting, append to the written file (optional).
Exceptions
sys::SystemExceptionIf the file can not be opened.

References elm::io::append(), Path::append(), Output::setStream(), and Path::write().

◆ FileOutput() [5/5]

FileOutput ( FileOutput &&  fo)

Transfer stream of the argument output to the current output.

Parameters
foFile output to transfer stream from.

References Output::setStream().

◆ ~FileOutput()

~FileOutput ( void  )

The documentation for this class was generated from the following files: