}
else
{
- size_t size = in->StreamSize();
+ size_t size = in->GetSize();
char *data = new char[size];
if ( !in->Read(data, size) )
{
Destructor will close the connection if connected.
+\membersection{wxFTP::Abort}\label{wxftpabort}
+
+\func{bool}{Abort}{\void}
+
+Aborts the download currently in process, returns {\tt true} if ok, {\tt false}
+if an error occured.
+
\membersection{wxFTP::CheckCommand}
\func{bool}{CheckCommand}{\param{const wxString\&}{ command}, \param{char }{ret}}
\wxheading{Return value}
-TRUE if the command has been sent successfully, else FALSE.
+true if the command has been sent successfully, else false.
\membersection{wxFTP::SendCommand}\label{wxftpsendcommand}
\func{bool}{ChDir}{\param{const wxString\&}{ dir}}
Change the current FTP working directory.
-Returns TRUE if successful.
+Returns true if successful.
\membersection{wxFTP::MkDir}
\func{bool}{MkDir}{\param{const wxString\&}{ dir}}
Create the specified directory in the current FTP working directory.
-Returns TRUE if successful.
+Returns true if successful.
\membersection{wxFTP::RmDir}
\func{bool}{RmDir}{\param{const wxString\&}{ dir}}
Remove the specified directory from the current FTP working directory.
-Returns TRUE if successful.
+Returns true if successful.
\membersection{wxFTP::Pwd}
\func{bool}{Rename}{\param{const wxString\&}{ src}, \param{const wxString\&}{ dst}}
-Rename the specified {\it src} element to {\it dst}. Returns TRUE if successful.
+Rename the specified {\it src} element to {\it dst}. Returns true if successful.
% ----------------------------------------------------------------------------
\func{bool}{RmFile}{\param{const wxString\&}{ path}}
-Delete the file specified by {\it path}. Returns TRUE if successful.
+Delete the file specified by {\it path}. Returns true if successful.
% ----------------------------------------------------------------------------
% ----------------------------------------------------------------------------
+\membersection{wxFTP::FileExists}\label{wxftpfileexists}
+
+\func{bool}{FileExists}{\param{const wxString\&}{ filename}}
+
+Returns {\tt true} if the given remote file exists, {\tt false} otherwise.
+
+\membersection{wxFTP::GetFileSize}\label{wxftpgetfilesize}
+
+\func{int}{GetFileSize}{\param{const wxString\&}{ filename}}
+
+Returns the file size in bytes or $-1$ if the file doesn't exist or the size
+couldn't be determined. Notice that this size can be approximative size only
+and shouldn't be used for allocating the buffer in which the remote file is
+copied, for example.
+
\membersection{wxFTP::GetDirList}\label{wxftpgetdirlist}
\func{bool}{GetDirList}{\param{wxArrayString\& }{files}, \param{const wxString\&}{ wildcard = ""}}
1 file(s) 520 196 bytes
\end{verbatim}
-Return value: TRUE if the file list was successfully retrieved, FALSE
+Return value: true if the file list was successfully retrieved, false
otherwise.
\wxheading{See also}
by default). This list always has the same format and contains one full
(including the directory path) file name per line.
-Return value: TRUE if the file list was successfully retrieved, FALSE
+Return value: true if the file list was successfully retrieved, false
otherwise.
% ----------------------------------------------------------------------------
ftp.ChDir("a_directory");
in_stream = ftp.GetInputStream("a_file_to_get");
- data = new char[in_stream->StreamSize()];
+ data = new char[in_stream->GetSize()];
- in_stream->Read(data, in_stream->StreamSize());
+ in_stream->Read(data, in_stream->GetSize());
if (in_stream->LastError() != wxStream_NOERROR) {
// Do something.
}