GNU Octave  4.2.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Typedefs | Functions | Variables
urlwrite.cc File Reference
#include <string>
#include <fstream>
#include <iomanip>
#include <iostream>
#include "dir-ops.h"
#include "file-ops.h"
#include "file-stat.h"
#include "oct-env.h"
#include "oct-handle.h"
#include "glob-match.h"
#include "singleton-cleanup.h"
#include "url-transfer.h"
#include "defun.h"
#include "error.h"
#include "ovl.h"
#include "ov-cell.h"
#include "pager.h"
#include "oct-map.h"
#include "oct-refcount.h"
#include "unwind-prot.h"
Include dependency graph for urlwrite.cc:

Go to the source code of this file.

Classes

class  ch_manager
 

Typedefs

typedef octave_handle curl_handle
 

Functions

static void delete_file (const std::string &file)
 
OCTAVE_EXPORT octave_value_list F__ftp__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__ftp_ascii__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__ftp_binary__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__ftp_close__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__ftp_cwd__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__ftp_delete__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__ftp_dir__ (const octave_value_list &args, int nargout)
 
OCTAVE_EXPORT octave_value_list F__ftp_mget__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__ftp_mkdir__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__ftp_mode__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__ftp_mput__ (const octave_value_list &args, int nargout)
 
OCTAVE_EXPORT octave_value_list F__ftp_pwd__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__ftp_rename__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__ftp_rmdir__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Furlwrite (const octave_value_list &args, int nargout) ar
 
 if (nargin!=2 &&nargin!=4) print_usage()
 
 if (nargin==4)
 
 if (!ofile.is_open()) error("urlwrite
 
static double make_handle_fraction (void)
 
std::ofstream ofile (filename.c_str(), std::ios::out|std::ios::binary)
 

Variables

nd group nd example The full
path of the downloaded file is
returned in 
ar {f}. The variable ar{success} is 1 if the download was successful
 
nd group nd example The full
path of the downloaded file is
returned in otherwise it is in
which case then the error is
signaled through Octave s
error handling mechanism This
function uses libcurl Curl
among the and FILE protocols
Username and password may be
specified in the for 
example
 
std::string filename = args(1).xstring_value ("urlwrite: LOCALFILE must be a string")
 
octave::sys::file_stat fs (filename)
 
nd group nd example The full
path of the downloaded file is
returned in otherwise it is in
which case then the error is
signaled through Octave s
error handling mechanism This
function uses libcurl Curl
among the 
FTP
 
nd group nd example The full
path of the downloaded file is
returned in otherwise it is in
which case then the error is
signaled through Octave s
error handling mechanism This
function uses libcurl Curl
among the 
HTTP
 
std::string method
 
nd group nd example The full
path of the downloaded file is
returned in otherwise it is in
which case then the error is
signaled through Octave s
error handling mechanism This
function uses libcurl Curl
among 
others
 
Array< std::stringparam
 
nd group nd example The full
path of the downloaded file is
returned in otherwise it is in
which case then the error is
signaled through Octave s
error handling mechanism This
function uses libcurl Curl 
supports
 
nd group nd example The full
path of the downloaded file is
returned in otherwise it is in
which case then the error is
signaled through Octave s
error handling mechanism This
function uses libcurl Curl
among the and FILE protocols
Username and password may be
specified in the 
URL
 
std::string url = args(0).xstring_value ("urlwrite: URL must be a string")
 

Typedef Documentation

Definition at line 61 of file urlwrite.cc.

Function Documentation

static void delete_file ( const std::string file)
static

Definition at line 56 of file urlwrite.cc.

References octave::sys::unlink().

Referenced by F__ftp_mget__().

OCTAVE_EXPORT octave_value_list F__ftp__ ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list F__ftp_ascii__ ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list F__ftp_binary__ ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list F__ftp_close__ ( const octave_value_list args,
int   
)

Definition at line 677 of file urlwrite.cc.

References error(), ch_manager::free(), h, ch_manager::lookup(), octave_handle::ok(), and ovl().

Referenced by install_urlwrite_fcns().

OCTAVE_EXPORT octave_value_list F__ftp_cwd__ ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list F__ftp_delete__ ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list F__ftp_dir__ ( const octave_value_list args,
int  nargout 
)
OCTAVE_EXPORT octave_value_list F__ftp_mget__ ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list F__ftp_mkdir__ ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list F__ftp_mode__ ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list F__ftp_mput__ ( const octave_value_list args,
int  nargout 
)
OCTAVE_EXPORT octave_value_list F__ftp_pwd__ ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list F__ftp_rename__ ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list F__ftp_rmdir__ ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list Furlwrite ( const octave_value_list args,
int  nargout 
)

Definition at line 329 of file urlwrite.cc.

Referenced by install_urlwrite_fcns().

if ( nargin!  = 2 &&nargin!=4)
if ( nargin  = = 4)

Definition at line 345 of file urlwrite.cc.

References error(), and Array< T >::numel().

if ( !ofile.  is_open())

Definition at line 366 of file urlwrite.cc.

static double make_handle_fraction ( void  )
static

Definition at line 222 of file urlwrite.cc.

Referenced by ch_manager::do_free(), and ch_manager::do_get_handle().

std::ofstream ofile ( filename.  c_str(),
std::ios::out|std::ios::binary   
)

Variable Documentation

nd group nd example The full path of the downloaded file is returned in otherwise it is in which case ar {f}. The variable ar{success} is 1 if the download was successful

Definition at line 329 of file urlwrite.cc.

nd group nd example The full path of the downloaded file is returned in otherwise it is in which case then the error is signaled through Octave s error handling mechanism This function uses libcurl Curl among the and FILE protocols Username and password may be specified in the for example

Definition at line 329 of file urlwrite.cc.

std::string filename = args(1).xstring_value ("urlwrite: LOCALFILE must be a string")
nd group nd example The full path of the downloaded file is returned in otherwise it is in which case then the error is signaled through Octave s error handling mechanism This function uses libcurl Curl among the FTP

Definition at line 329 of file urlwrite.cc.

nd group nd example The full path of the downloaded file is returned in otherwise it is in which case then the error is signaled through Octave s error handling mechanism This function uses libcurl Curl among the HTTP

Definition at line 329 of file urlwrite.cc.

std::string method

Definition at line 342 of file urlwrite.cc.

Referenced by symbol_table::find_function().

nd group nd example The full path of the downloaded file is returned in otherwise it is in which case then the error is signaled through Octave s error handling mechanism This function uses libcurl Curl among others

Definition at line 329 of file urlwrite.cc.

nd group nd example The full path of the downloaded file is returned in otherwise it is in which case then the error is signaled through Octave s error handling mechanism This function uses libcurl Curl supports

Definition at line 329 of file urlwrite.cc.

nd group nd example The full path of the downloaded file is returned in otherwise it is in which case then the error is signaled through Octave s error handling mechanism This function uses libcurl Curl among the and FILE protocols Username and password may be specified in the URL

Definition at line 329 of file urlwrite.cc.

std::string url = args(0).xstring_value ("urlwrite: URL must be a string")