Isis 3.0
Back | Home
Isis::FileName Class Reference

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
 
FileNameoperator= (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")
 

Detailed Description

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

* /path/base.extension:attribute
*

For example:

* /work1/mars.cub:5
*
Author
2002-06-11 Jeff Anderson

Constructor & Destructor Documentation

Isis::FileName::FileName ( )
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.

Member Function Documentation

FileName Isis::FileName::createTempFile ( FileName  templateFileName = "$TEMPORARY/temp")
static
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().

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
bool Isis::FileName::operator!= ( const FileName rhs)
FileName & Isis::FileName::operator= ( const FileName rhs)

Clears the current contents of the FileName object and reinitializes it with the argument.

Parameters
fileFile name to replace the current contents of the object.
bool Isis::FileName::operator== ( const FileName rhs)

References expanded().

QString Isis::FileName::originalPath ( ) const
QString Isis::FileName::path ( ) const

Returns the path.

Returns
the path portion of a filename. For *nix operating systems this includes everything upto but not including the last slash "/". For file names created without any slashes the current working directory will be returned.
  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
FileName Isis::FileName::version ( long  versionNumber) const
FileName Isis::FileName::version ( QDate  versionDate) const

The documentation for this class was generated from the following files:

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