X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d9a50173fbb25ea5dae7ba1001b89d682c4984b8..2c6f14e1a7b5062fcf77eda40824d820d9ac288e:/docs/latex/wx/ftp.tex diff --git a/docs/latex/wx/ftp.tex b/docs/latex/wx/ftp.tex index eb0bf3fe87..077787ba4e 100644 --- a/docs/latex/wx/ftp.tex +++ b/docs/latex/wx/ftp.tex @@ -44,7 +44,7 @@ Example of using wxFTP for file downloading: } else { - size_t size = in->StreamSize(); + size_t size = in->GetSize(); char *data = new char[size]; if ( !in->Read(data, size) ) { @@ -115,6 +115,13 @@ Default constructor. 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}} @@ -124,7 +131,7 @@ the expected result. \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} @@ -147,21 +154,21 @@ command. \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} @@ -175,7 +182,7 @@ Returns the current FTP working directory. \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. % ---------------------------------------------------------------------------- @@ -183,7 +190,7 @@ 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. % ---------------------------------------------------------------------------- @@ -246,6 +253,21 @@ to specify a user and a password. % ---------------------------------------------------------------------------- +\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 = ""}} @@ -273,7 +295,7 @@ winamp~1 exe 520196 02-25-1999 19:28 winamp204.exe 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} @@ -289,7 +311,7 @@ directory (optionally only of the files matching the {\it wildcard}, all files 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. % ---------------------------------------------------------------------------- @@ -343,9 +365,9 @@ send new commands without reconnecting. 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. }