ewmscp  ..
Public Member Functions | Protected Attributes | List of all members
libsshIoCommon Class Reference

#include <libsshCommon.h>

Inheritance diagram for libsshIoCommon:
[legend]
Collaboration diagram for libsshIoCommon:
[legend]

Public Member Functions

 libsshIoCommon (const std::string &aPath, libsshCommon &aHandler)
 
std::unique_ptr< const genericStatgetStat () override
 
- Public Member Functions inherited from ioHandle
 ioHandle ()
 
virtual ~ioHandle () noexcept(false)
 
virtual bool parallelizable () const
 tell if this handler is capable of parallel IO. Unsually not the case More...
 
virtual void setXattr (const std::string &, const std::string &)
 
virtual std::string getXattr (const std::string &)
 get one extended attribute value More...
 
virtual void removeXattr (const std::string &)
 
virtual size_t getBlockSize () const
 
virtual void setBlockSize (size_t newSize)
 
virtual std::unique_ptr< attrDataTypegetAttrData (const outputHandler::base *)
 get attributes in the optimal way for setting with aOutputHandler More...
 
virtual std::unique_ptr< acl::listgetAclData ()
 get acls More...
 

Protected Attributes

libsshCommonhandler
 
const std::string path
 
sftp_file file
 
- Protected Attributes inherited from ioHandle
size_t blockSize
 in bytes, block size to be used when reading or writing More...
 

Detailed Description

Definition at line 56 of file libsshCommon.h.

Constructor & Destructor Documentation

◆ libsshIoCommon()

libsshIoCommon::libsshIoCommon ( const std::string &  aPath,
libsshCommon aHandler 
)

Definition at line 198 of file libsshCommon.cpp.

199  :
200  handler(aHandler),
201  path(aPath) {
202 }

Member Function Documentation

◆ getStat()

std::unique_ptr< const genericStat > libsshIoCommon::getStat ( )
overridevirtual

Implements ioHandle.

Definition at line 208 of file libsshCommon.cpp.

208  {
209  timerInst(sftp_fstat);
210  auto stat = throwcall::sftp::badval(sftp_fstat(file), nullptr, handler,
211  "can't stat", path);
212  auto retval = new genericSftpStat(*stat, handler.getVfsStat(path));
213  sftp_attributes_free(stat);
214  return std::unique_ptr<const genericStat>(retval);
215 }

References throwcall::sftp::badval(), file, libsshCommon::getVfsStat(), handler, path, and timerInst.

Here is the call graph for this function:

Member Data Documentation

◆ file

sftp_file libsshIoCommon::file
protected

◆ handler

libsshCommon& libsshIoCommon::handler
protected

◆ path

const std::string libsshIoCommon::path
protected

The documentation for this class was generated from the following files:
libsshIoCommon::file
sftp_file file
Definition: libsshCommon.h:60
libsshIoCommon::path
const std::string path
Definition: libsshCommon.h:59
libsshIoCommon::handler
libsshCommon & handler
Definition: libsshCommon.h:58
timerInst
#define timerInst(subfunc)
Definition: timer.h:157
genericSftpStat
Definition: libsshCommon.h:16
throwcall::sftp::badval
T badval(T call, t badvalue, libsshCommon &handler, const Args &... args)
Definition: libsshCommon.h:82
libsshCommon::getVfsStat
const sftp_statvfs_struct & getVfsStat(const std::string &path)
Definition: libsshCommon.cpp:152