OpendTect
7.0
|
Provides I/O stream for file or system command. More...
Public Member Functions | |
StreamProvider (const char *filenm=nullptr) | |
StreamProvider (const OS::MachineCommand &, const char *workdir) | |
~StreamProvider () | |
void | addPathIfNecessary (const char *) |
adds given path if stored filename is relative More... | |
bool | exists (bool forread) const |
const char * | fileName () const |
bool | isBad () const |
bool | isCommand () const |
bool | isFile () const |
bool | isReadOnly () const |
StreamData | makeIStream (bool binary=true, bool dummyarg=true) const |
StreamData | makeOStream (bool binary=true, bool inplaceedit=false) const |
bool | remove (bool recursive=true) const |
bool | rename (const char *, const CallBack *cb=0) |
void | set (const char *inp) |
void | setCommand (const OS::MachineCommand &, const char *workdir) |
void | setFileName (const char *) |
bool | setReadOnly (bool yn) const |
Static Public Member Functions | |
static StreamData | createCmdIStream (const OS::MachineCommand &, const char *workdir, bool fromstderr=false) |
static StreamData | createCmdOStream (const OS::MachineCommand &, const char *workdir) |
static StreamData | createIStream (const char *, bool binary=true) |
static StreamData | createOStream (const char *, bool binary=true, bool inplaceedit=false) |
static const char * | sStdErr () |
static const char * | sStdIO () |
Static Protected Member Functions | |
static void | sendCBMsg (const CallBack *, const char *) |
Protected Attributes | |
BufferString | fname_ |
OS::MachineCommand * | mc_ = nullptr |
BufferString | workingdir_ |
Private Member Functions | |
StreamProvider (const StreamProvider &)=delete | |
StreamProvider & | operator= (const StreamProvider &)=delete |
Provides I/O stream for file or system command.
Examples:
C:\tmp\xx.txt /tmp/xx.txt
Files on remote servers are not supported.
<>
StreamProvider::StreamProvider | ( | const char * | filenm = nullptr | ) |
StreamProvider::StreamProvider | ( | const OS::MachineCommand & | , |
const char * | workdir | ||
) |
StreamProvider::~StreamProvider | ( | ) |
|
privatedelete |
void StreamProvider::addPathIfNecessary | ( | const char * | ) |
adds given path if stored filename is relative
|
static |
|
static |
|
static |
keep binary==true also for text files unless you know what you are doing. win32 thing only.
|
static |
keep binary==true also for text files unless you know what you are doing. win32 thing only.
bool StreamProvider::exists | ( | bool | forread | ) | const |
|
inline |
bool StreamProvider::isBad | ( | ) | const |
|
inline |
|
inline |
bool StreamProvider::isReadOnly | ( | ) | const |
StreamData StreamProvider::makeIStream | ( | bool | binary = true , |
bool | dummyarg = true |
||
) | const |
StreamData StreamProvider::makeOStream | ( | bool | binary = true , |
bool | inplaceedit = false |
||
) | const |
|
privatedelete |
bool StreamProvider::remove | ( | bool | recursive = true | ) | const |
bool StreamProvider::rename | ( | const char * | , |
const CallBack * | cb = 0 |
||
) |
renames if file. if successful, does a set() The callback will be called with a const char* capsule
|
staticprotected |
void StreamProvider::set | ( | const char * | inp | ) |
void StreamProvider::setCommand | ( | const OS::MachineCommand & | , |
const char * | workdir | ||
) |
void StreamProvider::setFileName | ( | const char * | ) |
bool StreamProvider::setReadOnly | ( | bool | yn | ) | const |
|
static |
|
static |
|
protected |
|
protected |
|
protected |
Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2024