%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxFile}}\label{wxfile}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxFile}}\label{wxfile}
\helpref{wxFFile}{wxffile} for a wrapper around {\tt FILE} structure.
{\tt wxFileOffset} is used by the wxFile functions which require offsets as
\helpref{wxFFile}{wxffile} for a wrapper around {\tt FILE} structure.
{\tt wxFileOffset} is used by the wxFile functions which require offsets as
-parameter or return them. If the platform supports it, wxFileOffset if a typedef
-for a native 64 bit integer, else a 32 bit integer is used for wxFileOffset.
+parameter or return them. If the platform supports it, wxFileOffset is a typedef
+for a native 64 bit integer, otherwise a 32 bit integer is used for wxFileOffset.
Opens a file with the given mode. As there is no way to return whether the
operation was successful or not from the constructor you should test the
Opens a file with the given mode. As there is no way to return whether the
operation was successful or not from the constructor you should test the
This function verifies if we may access the given file in specified mode. Only
values of wxFile::read or wxFile::write really make sense here.
This function verifies if we may access the given file in specified mode. Only
values of wxFile::read or wxFile::write really make sense here.
-\func{bool}{Create}{\param{const char*}{ filename}, \param{bool}{ overwrite = false}, \param{int }{access = wxS\_DEFAULT}}
+\func{bool}{Create}{\param{const wxString\&}{ filename}, \param{bool}{ overwrite = false}, \param{int }{access = wxS\_DEFAULT}}
Creates a file for writing. If the file already exists, setting {\bf overwrite} to true
will ensure it is overwritten.
Creates a file for writing. If the file already exists, setting {\bf overwrite} to true
will ensure it is overwritten.
Get back a file descriptor from wxFile object - the caller is responsible for closing the file if this
descriptor is opened. \helpref{IsOpened()}{wxfileisopened} will return false after call to Detach().
Get back a file descriptor from wxFile object - the caller is responsible for closing the file if this
descriptor is opened. \helpref{IsOpened()}{wxfileisopened} will return false after call to Detach().
\membersection{wxFile::fd}\label{wxfilefd}
\constfunc{int}{fd}{\void}
Returns the file descriptor associated with the file.
\membersection{wxFile::fd}\label{wxfilefd}
\constfunc{int}{fd}{\void}
Returns the file descriptor associated with the file.
\helpref{Read}{wxfileread} repeatedly and tests its return condition instead
of using Eof() as this will not work for special files under Unix.
\helpref{Read}{wxfileread} repeatedly and tests its return condition instead
of using Eof() as this will not work for special files under Unix.
due to a missing fsync function, which reduces the usefulness of this function
(it can still be called but it will do nothing on unsupported compilers).
due to a missing fsync function, which reduces the usefulness of this function
(it can still be called but it will do nothing on unsupported compilers).
- wxFILE_TYPE_UNKNOWN,
- wxFILE_TYPE_DISK, // a file supporting seeking to arbitrary offsets
- wxFILE_TYPE_TERMINAL, // a tty
- wxFILE_TYPE_PIPE // a pipe
+ wxFILE_KIND_UNKNOWN,
+ wxFILE_KIND_DISK, // a file supporting seeking to arbitrary offsets
+ wxFILE_KIND_TERMINAL, // a tty
+ wxFILE_KIND_PIPE // a pipe
\membersection{wxFile::IsOpened}\label{wxfileisopened}
\constfunc{bool}{IsOpened}{\void}
Returns true if the file has been opened.
\membersection{wxFile::IsOpened}\label{wxfileisopened}
\constfunc{bool}{IsOpened}{\void}
Returns true if the file has been opened.
\membersection{wxFile::Length}\label{wxfilelength}
\constfunc{wxFileOffset}{Length}{\void}
Returns the length of the file.
\membersection{wxFile::Length}\label{wxfilelength}
\constfunc{wxFileOffset}{Length}{\void}
Returns the length of the file.
\membersection{wxFile::Read}\label{wxfileread}
\func{size\_t}{Read}{\param{void*}{ buffer}, \param{size\_t}{ count}}
\membersection{wxFile::Read}\label{wxfileread}
\func{size\_t}{Read}{\param{void*}{ buffer}, \param{size\_t}{ count}}
\membersection{wxFile::Seek}\label{wxfileseek}
\func{wxFileOffset}{Seek}{\param{wxFileOffset }{ofs}, \param{wxSeekMode }{mode = wxFromStart}}
\membersection{wxFile::Seek}\label{wxfileseek}
\func{wxFileOffset}{Seek}{\param{wxFileOffset }{ofs}, \param{wxSeekMode }{mode = wxFromStart}}
\membersection{wxFile::SeekEnd}\label{wxfileseekend}
\func{wxFileOffset}{SeekEnd}{\param{wxFileOffset }{ofs = 0}}
\membersection{wxFile::SeekEnd}\label{wxfileseekend}
\func{wxFileOffset}{SeekEnd}{\param{wxFileOffset }{ofs = 0}}