Joedb
9.1.4
The Journal-Only Embedded Database
Loading...
Searching...
No Matches
src
joedb
ssh
SFTP_File.h
Go to the documentation of this file.
1
#ifndef joedb_ssh_SFTP_File_declared
2
#define joedb_ssh_SFTP_File_declared
3
4
#include "
joedb/ssh/SFTP.h
"
5
6
namespace
joedb
7
{
8
namespace
ssh
9
{
10
////////////////////////////////////////////////////////////////////////////
11
class
SFTP_File
12
////////////////////////////////////////////////////////////////////////////
13
{
14
private
:
15
const
sftp_file file;
16
17
public
:
18
SFTP_File
(
SFTP
&sftp,
const
char
*name,
int
access_type, mode_t mode):
19
file
20
(
21
sftp_open
22
(
23
sftp.
get
(),
24
name,
25
access_type,
26
mode
27
)
28
)
29
{
30
if
(file ==
nullptr
)
31
sftp.
throw_error
();
32
}
33
34
sftp_file
get
()
const
35
{
36
return
file;
37
}
38
39
~SFTP_File
()
40
{
41
sftp_close(file);
42
}
43
};
44
}
45
}
46
47
#endif
SFTP.h
joedb::ssh::SFTP_Allocation::throw_error
void throw_error(const char *message="sftp error: ") const
Definition
SFTP.cpp:28
joedb::ssh::SFTP_File
Definition
SFTP_File.h:13
joedb::ssh::SFTP_File::get
sftp_file get() const
Definition
SFTP_File.h:34
joedb::ssh::SFTP_File::SFTP_File
SFTP_File(SFTP &sftp, const char *name, int access_type, mode_t mode)
Definition
SFTP_File.h:18
joedb::ssh::SFTP_File::~SFTP_File
~SFTP_File()
Definition
SFTP_File.h:39
joedb::ssh::SFTP
Definition
SFTP.h:50
joedb
Definition
Blob.h:7
Generated by
1.9.8