%% Modified by:
%% Created: ~1997
%% RCS-ID: $Id$
-%% Copyright: (c) wxWindows team
-%% License: wxWindows license
+%% Copyright: (c) wxWidgets team
+%% License: wxWidgets license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxFTP}}\label{wxftp}
}
ftp.ChDir("/pub");
- wxInputStream *in = ftp.GetInputStream("wxWindows-4.2.0.tar.gz");
+ wxInputStream *in = ftp.GetInputStream("wxWidgets-4.2.0.tar.gz");
if ( !in )
{
wxLogError("Coudln't get file");
}
else
{
- size_t size = in->StreamSize();
+ size_t size = in->GetSize();
char *data = new char[size];
if ( !in->Read(data, size) )
{
\func{bool}{Abort}{\void}
-Aborts the download currently in process, returns {\tt TRUE} if ok, {\tt FALSE}
+Aborts the download currently in process, returns {\tt true} if ok, {\tt false}
if an error occured.
\membersection{wxFTP::CheckCommand}
\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.
% ----------------------------------------------------------------------------
\func{bool}{FileExists}{\param{const wxString\&}{ filename}}
-Returns {\tt TRUE} if the given remote file exists, {\tt FALSE} otherwise.
+Returns {\tt true} if the given remote file exists, {\tt false} otherwise.
\membersection{wxFTP::GetFileSize}\label{wxftpgetfilesize}
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.
}