/////////////////////////////////////////////////////////////////////////////
// Name: file.h
-// Purpose: documentation for wxTempFile class
+// Purpose: interface of wxTempFile
// Author: wxWidgets team
// RCS-ID: $Id$
// Licence: wxWindows license
/**
Returns @true if the file was successfully opened.
*/
- bool IsOpened();
+ bool IsOpened() const;
/**
Returns the length of the file.
*/
- wxFileOffset Length();
+ wxFileOffset Length() const;
/**
Open the temporary file, returns @true on success, @false if an error
another
error occurred.
*/
- wxFileOffset Tell();
+ wxFileOffset Tell() const;
/**
Write to the file, return @true on success, @false on failure.
};
+
/**
@class wxFile
@wxheader{file.h}
/**
Associates the file with the given file descriptor, which has already been
opened.
-
+
@param filename
The filename.
@param mode
/**
Destructor will close the file.
- @b NB: it is not virtual so you should not use wxFile polymorphically.
+ @note it is not virtual so you should not use wxFile polymorphically.
*/
~wxFile();
Read() repeatedly and tests its return condition instead
of using Eof() as this will not work for special files under Unix.
*/
- bool Eof();
+ bool Eof() const;
/**
Returns @true if the given name specifies an existing regular file (not a
/**
Returns the type of the file. Possible return values are:
*/
- wxFileKind GetKind();
+ wxFileKind GetKind() const;
/**
Returns @true if the file has been opened.
*/
- 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
/**
Seeks to the specified position.
-
+
@param ofs
Offset to seek to.
@param mode
One of wxFromStart, wxFromEnd, wxFromCurrent.
-
- @returns The actual offset position achieved, or wxInvalidOffset on
+
+ @return The actual offset position achieved, or wxInvalidOffset on
failure.
*/
wxFileOffset Seek(wxFileOffset ofs,
Moves the file pointer to the specified number of bytes relative to the end of
the file. For example, @c SeekEnd(-5) would position the pointer 5
bytes before the end.
-
+
@param ofs
Number of bytes before the end of the file.
-
- @returns The actual offset position achieved, or wxInvalidOffset on
+
+ @return The actual offset position achieved, or wxInvalidOffset on
failure.
*/
wxFileOffset SeekEnd(wxFileOffset ofs = 0);
another
error occurred.
*/
- wxFileOffset Tell();
+ wxFileOffset Tell() const;
/**
Writes the contents of the string to the file, returns @true on success.
/**
Returns the file descriptor associated with the file.
*/
- int fd();
+ int fd() const;
};
+