ScriptModule
Public Slots | List of all members
File Class Reference

The File class is base class to TemporaryFile and PermanentFile. More...

#include <FileInterface.h>

Inheritance diagram for File:
Inheritance graph
[legend]
Collaboration diagram for File:
Collaboration graph
[legend]

Public Slots

FilesetPath (const String &path)
 Specify absolute path of this image file. Name of file can be changed only if there is an open stream.
 
String path () const
 Retrieve file path.
 
String extension () const
 Retrieve file extension.
 
bool exists () const
 Verify if file exists on disk.
 
Stream Manipulation
bool isOpen () const
 Check if file is opened.
 
bool isClose () const
 Check if file is closed.
 
bool open (int m=int(IO::WRITE_ONLY))
 Open file stream for read/write.
 
bool close ()
 Close file stream.
 
void write (const String &text)
 Write string in current stream.
 
void writeLine (const String &text)
 Write string line in current stream.
 
void write (File file)
 Write entire content of parameter file in current stream.
 
String read ()
 Read entire content of stream.
 
String readLine ()
 Read single line of stream.
 
File management
bool move (File dest)
 
bool copy (File dest)
 

Detailed Description

The File class is base class to TemporaryFile and PermanentFile.

Member Function Documentation

bool File::close ( )
slot

Close file stream.

Returns
Sucess/Failure of operation
bool File::copy ( File  dest)
slot

Copy current File to new File destination

Parameters
destDestination
Returns
Result of operation
bool File::exists ( ) const
slot

Verify if file exists on disk.

Returns
exists on disk
String File::extension ( ) const
slot

Retrieve file extension.

Returns
extension String
bool File::isClose ( ) const
slot

Check if file is closed.

Returns
stream status
bool File::isOpen ( ) const
slot

Check if file is opened.

Returns
stream status
bool File::move ( File  dest)
slot

Move current File to new File destination

Parameters
destDestination
Returns
Result of operation
bool File::open ( int  m = int(IO::WRITE_ONLY))
slot

Open file stream for read/write.

Parameters
mIO stream descriptor
Returns
Success/Failure of operation
String File::path ( ) const
slot

Retrieve file path.

Returns
full path String
String File::read ( )
slot

Read entire content of stream.

Returns
String
String File::readLine ( )
slot

Read single line of stream.

Returns
String
File& File::setPath ( const String &  path)
slot

Specify absolute path of this image file. Name of file can be changed only if there is an open stream.

Parameters
pathAbsolute path String of image file
Returns
TemporaryFile reference
void File::write ( const String &  text)
slot

Write string in current stream.

Parameters
textText to write
void File::write ( File  file)
slot

Write entire content of parameter file in current stream.

Parameters
fileFile object
void File::writeLine ( const String &  text)
slot

Write string line in current stream.

Parameters
textText to write

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