/////////////////////////////////////////////////////////////////////////////
// Name: ffile.h
-// Purpose: documentation for wxFFile class
+// Purpose: interface of wxFFile
// Author: wxWidgets team
// RCS-ID: $Id$
// Licence: wxWindows license
@library{wxbase}
@category{file}
- @seealso
- wxFFile::IsOpened
+ @see wxFFile::IsOpened
*/
class wxFFile
{
//@{
/**
Opens a file with the given file pointer, which has already been opened.
-
+
@param filename
The filename.
@param mode
read.
Also note that this method may only be called for opened files and may crash if
the file is not opened.
-
+
@see IsOpened()
*/
- bool Eof();
+ bool Eof() const;
/**
Returns @true if an error has occurred on this file, similar to the standard
@c ferror() function.
Please note that this method may only be called for opened files and may crash
if the file is not opened.
-
+
@see IsOpened()
*/
/**
Returns the type of the file. Possible return values are:
*/
- wxFileKind GetKind();
+ wxFileKind GetKind() const;
/**
Returns @true if the file is opened. Most of the methods of this class may
only
be used for an opened file.
*/
- bool IsOpened();
+ bool IsOpened() const;
/**
Returns the length of the file.
*/
- wxFileOffset Length();
+ wxFileOffset Length() const;
/**
Opens the file, returning @true if successful.
-
+
@param filename
The filename.
@param mode
/**
Reads the specified number of bytes into a buffer, returning the actual number
read.
-
+
@param buffer
A buffer to receive the data.
@param count
The number of bytes to read.
-
+
@returns The number of bytes read.
*/
size_t Read(void* buffer, size_t count);
/**
)
Reads the entire contents of the file into a string.
-
+
@param str
String to read data into.
@param conv
Conversion object to use in Unicode build; by default supposes
that file contents is encoded in UTF-8.
-
+
@returns @true if file was read successfully, @false otherwise.
*/
bool ReadAll(wxString* str);
/**
Seeks to the specified position and returns @true on success.
-
+
@param ofs
Offset to seek to.
@param mode
Moves the file pointer to the specified number of bytes before the end of the
file
and returns @true on success.
-
+
@param ofs
Number of bytes before the end of the file.
*/
/**
Returns the current position.
*/
- wxFileOffset Tell();
+ wxFileOffset Tell() const;
/**
)
/**
Returns the file pointer associated with the file.
*/
- FILE* fp();
+ FILE* fp() const;
};
+