File name manipulation and expansion. More...
#include <FileName.h>
Public Member Functions | |
FileName () | |
Constructs an empty FileName object. More... | |
FileName (const char *fileName) | |
FileName (const QString &fileName) | |
FileName (const FileName &other) | |
~FileName () | |
Destroys the FileName object. More... | |
QString | originalPath () const |
QString | path () const |
Returns the path. More... | |
QString | attributes () const |
QString | baseName () const |
QString | name () const |
QString | extension () const |
QString | expanded () const |
QString | original () const |
FileName | addExtension (const QString &extension) const |
FileName | removeExtension () const |
FileName | setExtension (const QString &extension) const |
bool | isVersioned () const |
bool | isNumericallyVersioned () const |
bool | isDateVersioned () const |
FileName | highestVersion () const |
FileName | newVersion () const |
FileName | version (long versionNumber) const |
FileName | version (QDate versionDate) const |
bool | fileExists () const |
QDir | dir () const |
QString | toString () const |
FileName & | operator= (const FileName &rhs) |
Clears the current contents of the FileName object and reinitializes it with the argument. More... | |
bool | operator== (const FileName &rhs) |
bool | operator!= (const FileName &rhs) |
Static Public Member Functions | |
static FileName | createTempFile (FileName templateFileName="$TEMPORARY/temp") |
File name manipulation and expansion.
This class is used for manipulating filenames. It allows access to the path, extension, base name and Isis attributes. A standard Isis filename takes the form of
For example:
Isis::FileName::FileName | ( | ) |
Constructs an empty FileName object.
Referenced by addExtension(), createTempFile(), isDateVersioned(), isNumericallyVersioned(), removeExtension(), and version().
Isis::FileName::FileName | ( | const char * | fileName | ) |
Isis::FileName::FileName | ( | const QString & | fileName | ) |
Isis::FileName::FileName | ( | const FileName & | other | ) |
Isis::FileName::~FileName | ( | ) |
Destroys the FileName object.
FileName Isis::FileName::addExtension | ( | const QString & | extension | ) | const |
References attributes(), extension(), FileName(), name(), and originalPath().
Referenced by Isis::Cube::create(), IsisAml::GetFileName(), Isis::TextFile::Open(), setExtension(), Isis::JP2Exporter::write(), Isis::TiffExporter::write(), Isis::QtExporter::write(), Isis::ImageExporter::write(), and Isis::Cube::write().
QString Isis::FileName::attributes | ( | ) | const |
QString Isis::FileName::baseName | ( | ) | const |
Referenced by Isis::ProcessPolygons::AppendOutputCube(), Isis::PipelineApplication::BuildParamString(), createTempFile(), Isis::Pipeline::FinalOutput(), Isis::Equalization::generateOutputs(), Isis::ImportPdsTable::load(), removeExtension(), Isis::ProcessPolygons::SetStatCubes(), and Isis::ProcessGroundPolygons::SetStatCubes().
References _FILEINFO_, baseName(), extension(), FileName(), Isis::IException::Io, original(), originalPath(), and path().
QDir Isis::FileName::dir | ( | ) | const |
References expanded().
Referenced by Isis::Control::copyToNewProjectRoot(), Isis::Shape::copyToNewProjectRoot(), Isis::Image::copyToNewProjectRoot(), Isis::ShapeList::save(), Isis::ControlList::save(), Isis::ImageList::save(), Isis::GuiFileNameParameter::SelectFile(), Isis::Control::updateFileName(), Isis::Shape::updateFileName(), Isis::Image::updateFileName(), Isis::BundleSolutionInfo::updateFileName(), and Isis::UserInterface::UserInterface().
QString Isis::FileName::expanded | ( | ) | const |
Referenced by Isis::SerialNumberList::add(), Isis::Directory::addCnetEditorView(), Isis::CubeDataThread::AddCube(), Isis::Pvl::append(), Isis::Application::Application(), Isis::Blob::Blob(), Isis::ControlNetDiff::compare(), Isis::CorrelationMatrix::computeCorrelationMatrix(), Isis::BundleSolutionInfo::controlNetworkFileName(), Isis::ControlPointList::ControlPointList(), Isis::TiffImporter::convertProjection(), Isis::Cube::copy(), Isis::ProjectionFactory::Create(), Isis::Cube::create(), Isis::Spice::createCache(), Isis::BundleSolutionInfo::createH5File(), Isis::BundleResults::createH5Group(), Isis::ImageImporter::createOutput(), Isis::Shape::deleteFromDisk(), Isis::Image::deleteFromDisk(), dir(), Isis::ImportShapesWorkOrder::execute(), Isis::ImportImagesWorkOrder::execute(), fileExists(), Isis::SerialNumberList::fileNameIndex(), Isis::ProcessImportFits::fitsLabel(), Isis::ImageImporter::fromFileName(), Isis::ControlNetStatistics::GeneratePointStats(), IsisAml::GetFileName(), Isis::MosaicTool::getIcon(), Isis::Plugin::GetPlugin(), Isis::GuiFileNameParameter::GuiFileNameParameter(), isDateVersioned(), isNumericallyVersioned(), Isis::JP2Importer::JP2Importer(), Isis::ImportPdsTable::load(), main(), Isis::Mariner10Camera::Mariner10Camera(), Isis::MdiCubeViewport::MdiCubeViewport(), Isis::Process::MissionData(), Isis::ObservationNumberList::observationNumber(), Isis::TextFile::Open(), Isis::Project::open(), Isis::CubeManager::OpenCube(), Isis::BundleSolutionInfo::openH5File(), Isis::operator<<(), Isis::BundleSolutionInfo::operator=(), operator==(), Isis::BundleSolutionInfo::outputHeader(), path(), Isis::Preference::Preferences(), Isis::ControlNetStatistics::PrintImageStats(), Isis::ProcessImport::ProcessBil(), Isis::ProcessImport::ProcessBip(), Isis::ProcessImport::ProcessBsq(), Isis::ProcessImportPds::ProcessLabel(), Isis::Project::Project(), Isis::CorrelationMatrix::pvlObject(), Isis::BundleSolutionInfo::pvlObject(), Isis::PvlTranslationTable::PvlTranslationTable(), Isis::QtImporter::QtImporter(), Isis::ControlNetFileV0001::Read(), Isis::ControlNetFileV0002::Read(), Isis::ControlNetVersioner::Read(), Isis::Pvl::read(), Isis::ImageOverlapSet::ReadImageOverlaps(), Isis::PaletteWindow::readSettings(), Isis::FileDialog::readSettings(), Isis::SpecialPixelTool::readSettings(), Isis::Cube::reopen(), Isis::ProjectionFactory::RingsCreate(), Isis::ProgramLauncher::RunIsisProgram(), Isis::BundleSolutionInfo::save(), Isis::UserInterface::SaveHistory(), Isis::ScatterPlotWindow::ScatterPlotWindow(), Isis::GuiFileNameParameter::SelectFile(), Isis::SerialNumberList::serialNumber(), Isis::CorrelationMatrix::setCovarianceFileName(), Isis::ProcessImportFits::setFitsFile(), Isis::Pipeline::SetInputListFile(), Isis::MdiCubeViewport::setLinked(), Isis::ControlNetFilter::SetOutputFile(), Isis::Pipeline::SetOutputFile(), Isis::Pipeline::SetOutputListFile(), Isis::SpectralDefinition2D::SpectralDefinition2D(), Isis::ProcessExportPds::StandardImageImage(), Isis::ProcessExportPds::StandardJP2Image(), Isis::TiffImporter::TiffImporter(), Isis::Tool::Tool(), toString(), Isis::ProcessImportPds::TranslatePdsProjection(), Isis::BundleSolutionInfo::updateFileName(), Isis::BlinkTool::updateTool(), version(), Isis::VikingCamera::VikingCamera(), Isis::VoyagerCamera::VoyagerCamera(), Isis::WarningWidget::WarningWidget(), Isis::JP2Exporter::write(), Isis::TiffExporter::write(), Isis::ControlNetFileV0002::Write(), Isis::QtExporter::write(), Isis::CorrelationMatrix::write(), Isis::ControlNetVersioner::Write(), Isis::BundleSolutionInfo::write(), Isis::Pvl::write(), Isis::Cube::write(), Isis::ImageOverlapSet::WriteImageOverlaps(), Isis::PaletteWindow::writeSettings(), Isis::FileDialog::writeSettings(), Isis::SpecialPixelTool::writeSettings(), Isis::QnetNavTool::~QnetNavTool(), Isis::ScatterPlotWindow::~ScatterPlotWindow(), and Isis::Spice::~Spice().
QString Isis::FileName::extension | ( | ) | const |
Referenced by addExtension(), Isis::ProcessPolygons::AppendOutputCube(), createTempFile(), Isis::ImportShapesWorkOrder::execute(), Isis::ImportImagesWorkOrder::execute(), Isis::Equalization::generateOutputs(), Isis::SpectralDefinitionFactory::NewSpectralDefinition(), Isis::BundleSolutionInfo::openH5File(), and setExtension().
bool Isis::FileName::fileExists | ( | ) | const |
References expanded().
Referenced by Isis::DatabaseFactory::addAccessProfile(), Isis::Application::Application(), Isis::TiffImporter::convertProjection(), Isis::InterestOperatorFactory::Create(), Isis::PolygonSeederFactory::Create(), Isis::AtmosModelFactory::Create(), Isis::PhotoModelFactory::Create(), Isis::AutoRegFactory::Create(), Isis::NormModelFactory::Create(), Isis::ProjectionFactory::Create(), Isis::BundleSolutionInfo::createH5File(), Isis::OpenRecentProjectWorkOrder::isExecutable(), Isis::ImportPdsTable::load(), Isis::KernelDb::loadSystemDb(), Isis::Process::MissionData(), newVersion(), Isis::TextFile::Open(), Isis::BundleSolutionInfo::openH5File(), Isis::operator<<(), Isis::Directory::populateMainMenu(), Isis::Preference::Preferences(), Isis::ProjectionFactory::RingsCreate(), Isis::UserInterface::SaveHistory(), and Isis::UserInterface::UserInterface().
FileName Isis::FileName::highestVersion | ( | ) | const |
References _FILEINFO_, isDateVersioned(), isNumericallyVersioned(), isVersioned(), name(), originalPath(), Isis::IException::Unknown, and version().
Referenced by Isis::Process::MissionData().
bool Isis::FileName::isDateVersioned | ( | ) | const |
References expanded(), and FileName().
Referenced by highestVersion(), isVersioned(), and newVersion().
bool Isis::FileName::isNumericallyVersioned | ( | ) | const |
References expanded(), and FileName().
Referenced by highestVersion(), isVersioned(), and newVersion().
bool Isis::FileName::isVersioned | ( | ) | const |
References isDateVersioned(), and isNumericallyVersioned().
Referenced by highestVersion(), and newVersion().
QString Isis::FileName::name | ( | ) | const |
Referenced by addExtension(), Isis::Application::Application(), Isis::ControlNetDiff::compare(), Isis::ObservationNumber::Compose(), Isis::SerialNumber::Compose(), Isis::Control::copyToNewProjectRoot(), Isis::Shape::copyToNewProjectRoot(), Isis::Image::copyToNewProjectRoot(), Isis::Cube::create(), Isis::QnetPointCubeNameFilter::createCubeList(), Isis::MatchTool::createPoint(), Isis::ProcessExportPds::FixedImageRoot(), Isis::ProcessExportPds::FixedJP2ImageRoot(), Isis::ControlMeasure::GetChooserName(), Isis::ControlPoint::GetChooserName(), Isis::CorrelationMatrix::hasCovMat(), highestVersion(), Isis::CorrelationMatrix::isValid(), Isis::ImportPdsTable::load(), newVersion(), Isis::Cube::open(), Isis::ControlNetFileV0001::Read(), Isis::ControlNetFileV0002::Read(), Isis::ControlNetVersioner::Read(), Isis::QnetNavTool::resetList(), Isis::ProgramLauncher::RunIsisProgram(), Isis::GuiFileNameParameter::SelectFile(), Isis::ProcessMosaic::SetMosaicOrigin(), Isis::ProcessMapMosaic::StartProcess(), Isis::ProcessExportPds::StreamImageRoot(), Isis::ProcessExportPds::StreamJP2ImageRoot(), Isis::Control::updateFileName(), Isis::Shape::updateFileName(), Isis::Image::updateFileName(), Isis::BundleSolutionInfo::updateFileName(), Isis::ControlNetFileV0002::Write(), and Isis::Cube::write().
FileName Isis::FileName::newVersion | ( | ) | const |
bool Isis::FileName::operator!= | ( | const FileName & | rhs | ) |
Clears the current contents of the FileName object and reinitializes it with the argument.
file | File name to replace the current contents of the object. |
bool Isis::FileName::operator== | ( | const FileName & | rhs | ) |
References expanded().
QString Isis::FileName::original | ( | ) | const |
Referenced by Isis::Cube::copy(), createTempFile(), Isis::ImportShapesWorkOrder::execute(), Isis::ImportImagesWorkOrder::execute(), Isis::Cube::open(), Isis::Project::open(), Isis::Cube::relocateDnData(), Isis::ShapeList::save(), Isis::ControlList::save(), Isis::ImageList::save(), Isis::Project::save(), and Isis::Pipeline::SetInputFile().
QString Isis::FileName::originalPath | ( | ) | const |
References path().
Referenced by addExtension(), createTempFile(), highestVersion(), newVersion(), Isis::Cube::open(), removeExtension(), and version().
QString Isis::FileName::path | ( | ) | const |
Returns the path.
for a full file specification of: "/home/me/img/picture.jpg" path() gives: "/home/me/img"
References expanded().
Referenced by Isis::ProcessPolygons::AppendOutputCube(), Isis::Shape::copyToNewProjectRoot(), Isis::Image::copyToNewProjectRoot(), createTempFile(), Isis::Shape::deleteFromDisk(), Isis::Image::deleteFromDisk(), Isis::ProcessExportPds::ExportTable(), Isis::Pipeline::FinalOutput(), Isis::Blob::Find(), Isis::Equalization::generateOutputs(), Isis::ImportPdsTable::load(), Isis::QnetFileTool::open(), originalPath(), Isis::ProcessImportPds::ProcessLabel(), Isis::ShapeList::save(), Isis::ControlList::save(), Isis::ImageList::save(), Isis::ProcessPolygons::SetStatCubes(), and Isis::ProcessGroundPolygons::SetStatCubes().
FileName Isis::FileName::removeExtension | ( | ) | const |
References attributes(), baseName(), FileName(), and originalPath().
Referenced by setExtension(), and Isis::Cube::write().
FileName Isis::FileName::setExtension | ( | const QString & | extension | ) | const |
References addExtension(), extension(), and removeExtension().
Referenced by Isis::Shape::copyToNewProjectRoot(), Isis::Image::copyToNewProjectRoot(), Isis::Cube::create(), Isis::Shape::deleteFromDisk(), and Isis::Image::deleteFromDisk().
QString Isis::FileName::toString | ( | ) | const |
References expanded().
Referenced by Isis::Control::copyToNewProjectRoot(), Isis::Shape::copyToNewProjectRoot(), Isis::Image::copyToNewProjectRoot(), Isis::Cube::Cube(), Isis::ProcessImportFits::fitsLabel(), Isis::TextFile::Open(), Isis::Project::open(), Isis::FileList::read(), Isis::Cube::read(), Isis::ShapeList::save(), Isis::ControlList::save(), Isis::ImageList::save(), Isis::Project::save(), Isis::ProcessImportFits::setFitsFile(), Isis::SpectralDefinition1D::SpectralDefinition1D(), Isis::SpectralDefinition2D::SpectralDefinition2D(), version(), and Isis::FileList::write().
FileName Isis::FileName::version | ( | long | versionNumber | ) | const |
References _FILEINFO_, expanded(), FileName(), originalPath(), and Isis::IException::Unknown.
Referenced by highestVersion(), and newVersion().
FileName Isis::FileName::version | ( | QDate | versionDate | ) | const |
References FileName(), originalPath(), and toString().
U.S. Department of the Interior | U.S. Geological Survey ISIS | Privacy & Disclaimers | Astrogeology Research Program To contact us, please post comments and questions on the ISIS Support Center File Modified: 07/12/2023 23:37:16 |