class hdd

HDD is used to represent the local file system.

Inheritance:


Public Methods

[more]void engage(const char* url, const char* user, const char* passwd)
Activate the HDD driver.
[more]void disengage(void)
Close all connections.
[more]void put(const char* file)
Put a file.
[more]void get(const char* file)
Get a file.
[more]void put(const char* file, void (*f)(unsigned int), bool isOtherTested)
Visual put.
[more]void get(const char* file, void (*f)(unsigned int), bool isOtherTested)
Visual get.
[more]void rm(const char* file)
Remove a file
[more]const char* ls(const char* dir)
List contents of a directory
[more]virtual List* copy_flist()
Append directory listing to List object
[more]virtual List* repeat_flist()
Get a pointer to the current flist
[more]void mk_dir(const char* dir)
Create a directory
[more]void rm_dir(const char* dir)
Remove a empty directory
[more]void append(const char* file, const char* dest, unsigned int offset)
Append a file to another file.
[more]void setCurrDir(const char*)
Sets current working directory
[more]virtual Protocol* setCurrDir(ListItem* litm)
Changes the working directory.
[more]const char* getCurrDir(char* inbuf)
Gets current working directory
[more]void set_state(State* istate)
Set the local state reference
[more]virtual int open_stream(const char* name, const char* mode, int flg, int offset, unsigned int* file_size)
Open a stream.
[more]virtual const char* open_read_stream(ListItem* litm, int offset)
Open a stream for reading.
[more]virtual void open_write_stream(const char* fname, int offset)
Open a stream for writing.
[more]virtual int get_stream_size()
Returns size of read_stream
[more]virtual void close_stream(void)
Close a stream.
[more]virtual int read_stream(char* buffer, unsigned int size)
Read data.
[more]virtual int write_stream(const char* buffer, unsigned int size)
Write data.


Inherited from Protocol:

Public Methods

ovoid parse_url(const char* urlin, struct url_data* retdat)
ovoid abort_all(void)

Protected Methods

oconst char* get_fname(const char* fname)
oint is_absolute(const char* i)


Documentation

HDD is used to represent the local file system.
ovoid engage(const char* url, const char* user, const char* passwd)
Activate the HDD driver. Meaningless for a HDD protocol.

ovoid disengage(void)
Close all connections. Meaningless for a HDD protocol.

ovoid put(const char* file)
Put a file. Put the file to the current directory.

ovoid get(const char* file)
Get a file. Get the file and store in other-><Current Working Directory>

ovoid put(const char* file, void (*f)(unsigned int), bool isOtherTested)
Visual put. Put a file <file> from the other protocol to CWD+(get_fname(file)) ie, file is a the name (and path) of the file in the other protocol object that we want to put into this protocol object.

f is a function pointer that we use to update a progress bar.

the isOtherTested parameter is obsolete.

ovoid get(const char* file, void (*f)(unsigned int), bool isOtherTested)
Visual get. Get a file <file> from this protocol to the other protocol. The file is stored at the other protocl in it's CWD.

f is a function pointer that we use to update a progress bar.

the isOtherTested parameter is obsolete.

ovoid rm(const char* file)
Remove a file

oconst char* ls(const char* dir)
List contents of a directory

ovirtual List* copy_flist()
Append directory listing to List object

ovirtual List* repeat_flist()
Get a pointer to the current flist

ovoid mk_dir(const char* dir)
Create a directory

ovoid rm_dir(const char* dir)
Remove a empty directory

ovoid append(const char* file, const char* dest, unsigned int offset)
Append a file to another file. Start reading other->file at offset, append that data to this->dest.

ovoid setCurrDir(const char*)
Sets current working directory

ovirtual Protocol* setCurrDir(ListItem* litm)
Changes the working directory. The r is a reference to a internal list, the list can be retrieved with getDirectoryList().

oconst char* getCurrDir(char* inbuf)
Gets current working directory

ovoid set_state(State* istate)
Set the local state reference

ovirtual int open_stream(const char* name, const char* mode, int flg, int offset, unsigned int* file_size)
Open a stream. Open a stream with mode. success: return 0 failure: return <something not 0>

ovirtual const char* open_read_stream(ListItem* litm, int offset)
Open a stream for reading. Throws a protoerr on failure. Offset indicates where to resume

ovirtual void open_write_stream(const char* fname, int offset)
Open a stream for writing. Throws a protoerr on failure. Offset indicates where to append

ovirtual int get_stream_size()
Returns size of read_stream

ovirtual void close_stream(void)
Close a stream. Close the latest stream opened with open_stream()

ovirtual int read_stream(char* buffer, unsigned int size)
Read data. Read data from the stream to buffer.

ovirtual int write_stream(const char* buffer, unsigned int size)
Write data. Write data to the stream from buffer.


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.