| OpendTect 8.0

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Attributes | Private Attributes | List of all members
FileSpec Class Reference
Basic

Specification for one or more files. More...

`#include <filespec.h>`

Inheritance diagram for FileSpec:
[legend]

## Public Member Functions
| FileSpec (const char *fnm=nullptr)
| FileSpec (const DBKey &)
| FileSpec (const IOPar &)
virtual | ~FileSpec ()
const char * | absFileName (int nr=0) const
| adds path if necessary
const char * | dirName () const
| only the dir name
const char * | dispName () const
| for titles etc
void | ensureBaseDir (const char *dirnm)
const char * | fileName (int nr=0) const
void | fillPar (IOPar &) const
const char * | fullDirName () const
| full name of dir
void | getMultiFromString (const char *)
void | getReport (IOPar &) const
bool | isEmpty () const
bool | isMulti () const
bool | isRangeMulti () const
void | makeAbsoluteIfRelative (const char *dirnm)
void | makePathsRelative (const char *todir=0)
int | nrFiles () const
void | setBaseDir (const char *dirnm)
void | setEmpty ()
void | setFileName (const char *fnm)
void | setUsrStr (const char *str)
bool | usePar (const IOPar &)
const char * | usrStr () const
| a user-typed filename

## Static Public Member Functions
static void | makePathsRelative (IOPar &, const char *todir=0)
static const char * | sKeyFileNrs ()

## Public Attributes
BufferStringSet | fnames_
StepInterval< int > | nrs_
BufferString | survsubdir_
| For example "Seismics".
int | zeropad_ = 0
| left-pad the nrs_ to this length

## Protected Attributes
BufferString | usrstr_

## Private Attributes
BufferString | datadir_

## Detailed Description

Specification for one or more files.

If the paths are not absolute, they will be considered relative to the current survey directory. If you work with relative pathnames, you can specify a subdir-from-survey-dir.

<>

## Constructor & Destructor Documentation

## ◆ FileSpec() [1/3]

FileSpec::FileSpec | ( | const char * | fnm = nullptr | ) |

## ◆ FileSpec() [2/3]

FileSpec::FileSpec | ( | const DBKey & |  | ) |

## ◆ FileSpec() [3/3]

FileSpec::FileSpec | ( | const IOPar & |  | ) |

## ◆ ~FileSpec()

virtual FileSpec::~FileSpec | ( |  | ) |
| virtual

Reimplemented in SEGY::FileSpec.

## Member Function Documentation

## ◆ absFileName()

const char * FileSpec::absFileName | ( | int | nr = 0 | ) | const

adds path if necessary

## ◆ dirName()

const char * FileSpec::dirName | ( |  | ) | const

only the dir name

## ◆ dispName()

const char * FileSpec::dispName | ( |  | ) | const

for titles etc

## ◆ ensureBaseDir()

void FileSpec::ensureBaseDir | ( | const char * | dirnm | ) |

## ◆ fileName()

const char * FileSpec::fileName | ( | int | nr = 0 | ) | const

## ◆ fillPar()

void FileSpec::fillPar | ( | IOPar & |  | ) | const

## ◆ fullDirName()

const char * FileSpec::fullDirName | ( |  | ) | const

full name of dir

## ◆ getMultiFromString()

void FileSpec::getMultiFromString | ( | const char * |  | ) |

## ◆ getReport()

void FileSpec::getReport | ( | IOPar & |  | ) | const

## ◆ isEmpty()

bool FileSpec::isEmpty | ( |  | ) | const
| inline

## ◆ isMulti()

bool FileSpec::isMulti | ( |  | ) | const
| inline

## ◆ isRangeMulti()

bool FileSpec::isRangeMulti | ( |  | ) | const

## ◆ makeAbsoluteIfRelative()

void FileSpec::makeAbsoluteIfRelative | ( | const char * | dirnm | ) |

## ◆ makePathsRelative() [1/2]

void FileSpec::makePathsRelative | ( | const char * | todir = 0 | ) |

## ◆ makePathsRelative() [2/2]

static void FileSpec::makePathsRelative | ( | IOPar & | ,
|  | const char * | todir = 0 )
| static

## ◆ nrFiles()

int FileSpec::nrFiles | ( |  | ) | const

## ◆ setBaseDir()

void FileSpec::setBaseDir | ( | const char * | dirnm | ) |

## ◆ setEmpty()

void FileSpec::setEmpty | ( |  | ) |
| inline

## ◆ setFileName()

void FileSpec::setFileName | ( | const char * | fnm | ) |

## ◆ setUsrStr()

void FileSpec::setUsrStr | ( | const char * | str | ) |
| inline

## ◆ sKeyFileNrs()

static const char * FileSpec::sKeyFileNrs | ( |  | ) |
| static

## ◆ usePar()

bool FileSpec::usePar | ( | const IOPar & |  | ) |

## ◆ usrStr()

const char * FileSpec::usrStr | ( |  | ) | const

a user-typed filename

## Member Data Documentation

## ◆ datadir_

BufferString FileSpec::datadir_
| private

## ◆ fnames_

BufferStringSet FileSpec::fnames_

## ◆ nrs_

StepInterval<int> FileSpec::nrs_

## ◆ survsubdir_

BufferString FileSpec::survsubdir_

For example "Seismics".

## ◆ usrstr_

BufferString FileSpec::usrstr_
| protected

## ◆ zeropad_

int FileSpec::zeropad_ = 0

left-pad the nrs_ to this length

Generated at
for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2025