Regina Calculation Engine
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
regina::FileInfo Class Reference

Stores information about a Regina data file, including file type and version. More...

#include <file/fileinfo.h>

Inheritance diagram for regina::FileInfo:
regina::Output< FileInfo >

Public Member Functions

 FileInfo (const FileInfo &)=default
 Creates a new copy of the given file information. More...
 
const std::string & pathname () const
 Returns the pathname of the data file being described. More...
 
int type () const
 Returns the type of data file. More...
 
const std::string & typeDescription () const
 Returns a human-readable description of the type of data file. More...
 
const std::string & engine () const
 Returns the version of the calculation engine that wrote this file. More...
 
bool isCompressed () const
 Returns whether this file is stored in compressed format. More...
 
bool isInvalid () const
 Returns whether the file metadata could not be read. More...
 
FileInfooperator= (const FileInfo &)=default
 Sets this to be a copy of the given file information. More...
 
void writeTextShort (std::ostream &out) const
 Writes a short text representation of this object to the given output stream. More...
 
void writeTextLong (std::ostream &out) const
 Writes a detailed text representation of this object to the given output stream. More...
 
std::string str () const
 Returns a short text representation of this object. More...
 
std::string utf8 () const
 Returns a short text representation of this object using unicode characters. More...
 
std::string detail () const
 Returns a detailed text representation of this object. More...
 

Static Public Member Functions

static FileInfoidentify (const std::string &idPathname)
 Return information about the given Regina data file. More...
 

Static Public Attributes

static const int TYPE_XML
 Represents a new-style XML data file. More...
 

Detailed Description

Stores information about a Regina data file, including file type and version.

Routine identify() can be used to determine this information for a given file.

As of Regina 4.94, the old-style binary files are no longer supported. These have not been in use for over a decade. The only file type that this class now recognises is TYPE_XML (compressed or uncompressed XML data files).

Member Function Documentation

◆ detail()

std::string regina::Output< FileInfo , false >::detail
inherited

Returns a detailed text representation of this object.

This text may span many lines, and should provide the user with all the information they could want. It should be human-readable, should not contain extremely long lines (which cause problems for users reading the output in a terminal), and should end with a final newline. There are no restrictions on the underlying character set.

Returns
a detailed text representation of this object.

◆ str()

std::string regina::Output< FileInfo , false >::str
inherited

Returns a short text representation of this object.

This text should be human-readable, should fit on a single line, and should not end with a newline. Where possible, it should use plain ASCII characters.

Python:\n In addition to str(), this is also used as the
Python "stringification" function str().
Returns
a short text representation of this object.

◆ utf8()

std::string regina::Output< FileInfo , false >::utf8
inherited

Returns a short text representation of this object using unicode characters.

Like str(), this text should be human-readable, should fit on a single line, and should not end with a newline. In addition, it may use unicode characters to make the output more pleasant to read. This string will be encoded in UTF-8.

Returns
a short text representation of this object.

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

Copyright © 1999-2018, The Regina development team
This software is released under the GNU General Public License, with some additional permissions; see the source code for details.
For further information, or to submit a bug or other problem, please contact Ben Burton (bab@maths.uq.edu.au).