| Qore FileLocationHandler Module Reference 2.1

FileLocationHandlerFtp.qc.dox.h
1 // -*- mode: c++; indent-tabs-mode: nil -*-
3
4 /* FileLocationHandlerFtp Copyright 2021 - 2022 Qore Technologies, s.r.o.
5
6 Permission is hereby granted, free of charge, to any person obtaining a
7 copy of this software and associated documentation files (the "Software"),
8 to deal in the Software without restriction, including without limitation
9 the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 and/or sell copies of the Software, and to permit persons to whom the
11 Software is furnished to do so, subject to the following conditions:
12
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 DEALINGS IN THE SOFTWARE.
23 */
24
26 namespace FileLocationHandler {
28 class FileLocationHandlerFtp : public AbstractFileLocationHandler {
29
30 public:
32
34 const FtpClientLocationOpts = {
35 "encoding": <FileHandlerOptionInfo>{
36 "type": "string",
37 "desc": "the encoding of the file's data (read / write)",
38 },
39 };
40
42
50 protected:
51 string getTextFileImpl(string scheme, string location, *hash<auto> opts);
52 public:
53
54
56
64 protected:
65 binary getBinaryFileImpl(string scheme, string location, *hash<auto> opts);
66 public:
67
68
70
76 protected:
77 Qore::StreamReader getStreamReaderImpl(string scheme, string location, *hash<auto> opts);
78 public:
79
80
82
88 protected:
89 Qore::InputStream getBinaryStreamImpl(string scheme, string location, *hash<auto> opts);
90 public:
91
92
94
99 protected:
100 writeFileImpl(string scheme, string location, data contents, *hash<auto> opts);
101 public:
102
103
105
117 protected:
118 OutputStreamWrapper getOutputStreamImpl(string scheme, string location, *hash<auto> opts);
119 public:
120
121
123
125 protected:
126 hash<string, hash<FileHandlerOptionInfo>> getReadOptionsImpl();
127 public:
128
129
131
133 protected:
134 hash<string, hash<FileHandlerOptionInfo>> getWriteOptionsImpl();
135 public:
136
137
139 protected:
140 FtpClient getFtpClient(string scheme, string location, *hash<auto> opts, reference<string> file);
141 public:
142
143 };
144 };
FileLocationHandler::AbstractFileLocationHandler
The abstract file location handler class.
Definition: FileLocationHandler.qc.dox.h:43
FileLocationHandler::FileLocationHandlerFtp
The class for handling file locations.
Definition: FileLocationHandlerFtp.qc.dox.h:28
FileLocationHandler::FileLocationHandlerFtp::getWriteOptionsImpl
hash< string, hash< FileHandlerOptionInfo > > getWriteOptionsImpl()
Gets supported write options.
FileLocationHandler::FileLocationHandlerFtp::getTextFileImpl
string getTextFileImpl(string scheme, string location, *hash< auto > opts)
Retrieves a text file from the given location.
FileLocationHandler::FileLocationHandlerFtp::getBinaryFileImpl
binary getBinaryFileImpl(string scheme, string location, *hash< auto > opts)
Retrieves a binary file from the given location.
FileLocationHandler::FileLocationHandlerFtp::getFtpClient
FtpClient getFtpClient(string scheme, string location, *hash< auto > opts, reference< string > file)
Returns an FTP client for the given location.
FileLocationHandler::FileLocationHandlerFtp::getReadOptionsImpl
hash< string, hash< FileHandlerOptionInfo > > getReadOptionsImpl()
Gets supported read options.
FileLocationHandler::FileLocationHandlerFtp::getStreamReaderImpl
Qore::StreamReader getStreamReaderImpl(string scheme, string location, *hash< auto > opts)
Returns a stream reader for the file's data at the given location.
FileLocationHandler::FileLocationHandlerFtp::FtpClientLocationOpts
const FtpClientLocationOpts
Valid common file location options.
Definition: FileLocationHandlerFtp.qc.dox.h:34
FileLocationHandler::FileLocationHandlerFtp::getBinaryStreamImpl
Qore::InputStream getBinaryStreamImpl(string scheme, string location, *hash< auto > opts)
Retrieves a binary file from the given location.
FileLocationHandler::FileLocationHandlerFtp::getOutputStreamImpl
OutputStreamWrapper getOutputStreamImpl(string scheme, string location, *hash< auto > opts)
Returns an output stream for writing data to the given location.
FileLocationHandler::FileLocationHandlerFtp::writeFileImpl
writeFileImpl(string scheme, string location, data contents, *hash< auto > opts)
Writes data to a file at the given location.
FileLocationHandler::OutputStreamWrapper
The abstract file location handler class.
Definition: OutputStramWrapper.qc.dox.h:28
Qore::InputStream
Qore::StreamReader
binary
binary binary()
FileLocationHandler
Contains all public definitions in the FileLocationHandler module.
Definition: FileLocationHandler.qc.dox.h:26
FileLocationHandler::FileHandlerOptionInfo
File handler option info.
Definition: FileLocationHandler.qc.dox.h:28