winIDEA SDK
isys::CRemoteFileController Class Reference

Description

This class can be used to access files located on host, where winIDEA is running.

winIDEA instance is defined by connection manager provided in constructor.

This class is intended to be used when script is running on other host than the one running winIDEA.

Important: Complete file is copied to memory, so size of file to be read or written is limited by available computer memory.

Python example: test_exists.py

#include <CRemoteFileController.h>

Inheritance diagram for isys::CRemoteFileController:
isys::WrapperBase

Public Member Functions

bool exists (const std::string &fileName)
 Returns true, if remote file (on host running winIDEA) exists. More...
 
bool remove (const std::string &fileName)
 Deletes remote file (on host running winIDEA). More...
 
void readFromRemote (const std::string &remoteSrcFile, const std::string &localDestFile)
 Reads remote file and saves it locally. More...
 
void writeToRemote (const std::string &localSrcFile, const std::string &remoteDestFile)
 Writes local file to remote host. More...
 

Member Function Documentation

◆ exists()

bool isys::CRemoteFileController::exists ( const std::string &  fileName)

Returns true, if remote file (on host running winIDEA) exists.

Python example: test_exists.py

◆ readFromRemote()

void isys::CRemoteFileController::readFromRemote ( const std::string &  remoteSrcFile,
const std::string &  localDestFile 
)

Reads remote file and saves it locally.

Parameters
localDestFilelocal file used for saving. If the file exists, it is overwritten.
remoteSrcFileremote file to be copied to local host.

Python example: test_read_write.py

◆ remove()

bool isys::CRemoteFileController::remove ( const std::string &  fileName)

Deletes remote file (on host running winIDEA).

Returns
true if the file was deleted, false if it didn't exist.

Python example: test_remove.py

◆ writeToRemote()

void isys::CRemoteFileController::writeToRemote ( const std::string &  localSrcFile,
const std::string &  remoteDestFile 
)

Writes local file to remote host.

Parameters
localSrcFilelocal file used as source.
remoteDestFileremote file used as destination. If the file exists, it is overwritten.

Python example: test_read_write.py