28 #if !defined (octave_url_transfer_h)
29 #define octave_url_transfer_h 1
44 curl_xfer->
cwd (
"..");
52 : count (1), host_or_url (), valid (false), ftp (false),
53 ascii_mode (false), ok (true), errmsg (),
54 curr_istream (&std::cin), curr_ostream (&std::cout)
61 : count (1), host_or_url (host), valid (false), ftp (true),
62 ascii_mode (false), ok (true), errmsg (), curr_istream (&std::cin),
63 curr_ostream (&os) { }
66 : count (1), host_or_url (url), valid (false), ftp (false),
67 ascii_mode (false), ok (true), errmsg (),
68 curr_istream (&std::cin), curr_ostream (&os) { }
74 bool good (
void)
const {
return valid && ok; }
78 virtual std::string
lasterror (
void)
const {
return errmsg; }
94 bool is_ascii (
void)
const {
return ascii_mode; }
98 virtual void cwd (
const std::string& ) { }
100 virtual void del (
const std::string& ) { }
102 virtual void rmdir (
const std::string& ) { }
104 virtual void mkdir (
const std::string& ) { }
106 virtual void rename (
const std::string& ,
107 const std::string& ) { }
109 virtual void put (
const std::string& ,
112 virtual void get (
const std::string& ,
116 const std::string& target);
119 const std::string& directory);
121 virtual void dir (
void) { }
130 virtual std::string
pwd (
void) {
return std::string (); }
137 const std::string& ) { }
171 url_transfer (
const std::string& host,
const std::string& user,
172 const std::string& passwd, std::ostream& os);
174 url_transfer (
const std::string& url, std::ostream& os);
233 void rename (
const std::string& oldname,
const std::string& newname)
238 void put (
const std::string& file, std::istream& is)
243 void get (
const std::string& file, std::ostream& os)
249 const std::string& target)
255 const std::string& directory)
265 time_t& filetime,
bool& fileisdir)
277 const std::string& action)