|
Doxygen
|
Minimal replacement for QFileInfo. More...
#include <src/fileinfo.h>
Public Member Functions | |
| FileInfo (const std::string &name) | |
| bool | exists () const |
| size_t | size () const |
| bool | isWritable () const |
| bool | isReadable () const |
| bool | isExecutable () const |
| bool | isRelative () const |
| bool | isFile () const |
| bool | isDir () const |
| bool | isSymLink () const |
| std::string | readLink () const |
| std::string | filePath () const |
| std::string | absFilePath () const |
| std::string | fileName () const |
| std::string | baseName () const |
| std::string | extension (bool complete) const |
| std::string | dirPath (bool absPath=true) const |
| template<class PatternList, class PatternElem = std::string, typename PatternGet = std::string(*)(const PatternElem &)> | |
| bool | match (const PatternList &patList, bool caseSenseNames, PatternElem *elem=nullptr, PatternGet getter=[](const std::string &s){ return s;}) const |
| Match the file name against a list of patterns. | |
Static Private Member Functions | |
| static void | correctPath (std::string &s) |
Private Attributes | |
| std::string | m_name |
Minimal replacement for QFileInfo.
Definition at line 25 of file fileinfo.h.
|
inlineexplicit |
| std::string FileInfo::absFilePath | ( | ) | const |
Definition at line 105 of file fileinfo.cpp.
References correctPath(), and m_name.
Referenced by Preprocessor::addSearchDir(), checkAndOpenFile(), checkMarkdownMainfile(), cleanUpPaths(), determineAbsoluteIncludeName(), dirPath(), findExampleFilePath(), FormulaManager::generateImages(), getConvertLatexMacro(), markdownFileNameToId(), openDbConnection(), parseFile(), MarkdownOutlineParser::parseInput(), preProcessFile(), RTFGenerator::preProcessFileInplace(), Markdown::Private::processLink(), readConfiguration(), readDir(), readFileOrDirectory(), readTagFile(), resolveDirLink(), setFileName(), substituteLatexKeywords(), and ClassDefImpl::writeIncludeFilesForSlice().
| std::string FileInfo::baseName | ( | ) | const |
Definition at line 127 of file fileinfo.cpp.
References fileName().
Referenced by parseMain().
|
staticprivate |
Definition at line 100 of file fileinfo.cpp.
Referenced by absFilePath(), and dirPath().
| std::string FileInfo::dirPath | ( | bool | absPath = true | ) | const |
Definition at line 141 of file fileinfo.cpp.
References absFilePath(), correctPath(), and m_name.
Referenced by Config::checkAndCorrect(), determineAbsoluteIncludeName(), findFile(), findPackageScope(), initWarningFormat(), DocbookDocVisitor::operator()(), DocbookDocVisitor::operator()(), HtmlDocVisitor::operator()(), HtmlDocVisitor::operator()(), LatexDocVisitor::operator()(), LatexDocVisitor::operator()(), ManDocVisitor::operator()(), ManDocVisitor::operator()(), RTFDocVisitor::operator()(), RTFDocVisitor::operator()(), XmlDocVisitor::operator()(), XmlDocVisitor::operator()(), CodeFragmentManager::parseCodeFragment(), readDir(), and readFileOrDirectory().
| bool FileInfo::exists | ( | ) | const |
Definition at line 34 of file fileinfo.cpp.
References m_name.
Referenced by Config::checkAndCorrect(), checkAndOpenFile(), checkMarkdownMainfile(), cleanUpPaths(), computeVerifiedDotPath(), copyExtraFiles(), copyIcon(), copyLatexStyleSheet(), copyLogo(), copyStyleSheet(), deliverablesPresent(), determineAbsoluteIncludeName(), Dir::exists(), ExistsOnPath(), extractBoundingBox(), extraLatexStyleSheet(), fileToString(), DocParser::findAndCopyImage(), findExampleFilePath(), findFile(), findPackageScopeFromPath(), CitationManager::generatePage(), RTFGenerator::init(), FormulaManager::initFromRepository(), CitationManager::insertCrossReferencesForBibFile(), insertMapFile(), javaExecutable(), CitationManager::latexBibFiles(), Htags::loadFilemap(), openDbConnection(), openOutputFile(), parseInput(), Markdown::Private::processLink(), readConfiguration(), readDir(), readFileOrDirectory(), readIncludeFile(), readInputFile(), readTagFile(), readTextFileByName(), runMermaid(), runPlantumlContent(), ManGenerator::startDoxyAnchor(), substituteHtmlKeywords(), tryPath(), ClassDefImpl::writeIncludeFilesForSlice(), and HtmlGenerator::writeStyleInfo().
| std::string FileInfo::extension | ( | bool | complete | ) | const |
Definition at line 134 of file fileinfo.cpp.
References fileName().
Referenced by getLanguageFromFileName(), and DefinitionImpl::Private::setDefFileName().
| std::string FileInfo::fileName | ( | ) | const |
Definition at line 122 of file fileinfo.cpp.
References m_name.
Referenced by baseName(), copyExtraFiles(), copyIcon(), copyLatexStyleSheet(), copyLogo(), copyStyleSheet(), FormulaManager::createLatexFile(), extension(), extraLatexStyleSheet(), FormulaManager::generateImages(), RTFGenerator::init(), DocbookDocVisitor::operator()(), DocbookDocVisitor::operator()(), HtmlDocVisitor::operator()(), HtmlDocVisitor::operator()(), LatexDocVisitor::operator()(), LatexDocVisitor::operator()(), ManDocVisitor::operator()(), ManDocVisitor::operator()(), RTFDocVisitor::operator()(), RTFDocVisitor::operator()(), XmlDocVisitor::operator()(), XmlDocVisitor::operator()(), CodeFragmentManager::parseCodeFragment(), MarkdownOutlineParser::parseInput(), Markdown::Private::processLink(), readDir(), readFileOrDirectory(), substituteHtmlKeywords(), substituteLatexKeywords(), and HtmlGenerator::writeStyleInfo().
| std::string FileInfo::filePath | ( | ) | const |
| bool FileInfo::isDir | ( | ) | const |
Definition at line 74 of file fileinfo.cpp.
References m_name.
Referenced by Preprocessor::addSearchDir(), Config::checkAndCorrect(), cleanUpPaths(), copyExtraFiles(), copyIcon(), copyLatexStyleSheet(), copyLogo(), copyStyleSheet(), determineAbsoluteIncludeName(), Dir::exists(), readDir(), readFileOrDirectory(), and resolveSymlink().
| bool FileInfo::isExecutable | ( | ) | const |
Definition at line 55 of file fileinfo.cpp.
References m_name.
| bool FileInfo::isFile | ( | ) | const |
Definition at line 67 of file fileinfo.cpp.
References m_name.
Referenced by Config::checkAndCorrect(), checkAndOpenFile(), computeVerifiedDotPath(), fileToString(), javaExecutable(), parseInput(), readDir(), readFileOrDirectory(), readIncludeFile(), readTagFile(), runPlantumlContent(), tryPath(), and HtmlGenerator::writeStyleInfo().
| bool FileInfo::isReadable | ( | ) | const |
Definition at line 48 of file fileinfo.cpp.
References m_name.
Referenced by Htags::loadFilemap(), Markdown::Private::processLink(), readDir(), readFileOrDirectory(), and HtmlGenerator::writeStyleInfo().
| bool FileInfo::isRelative | ( | ) | const |
| bool FileInfo::isSymLink | ( | ) | const |
Definition at line 81 of file fileinfo.cpp.
References m_name.
Referenced by DocParser::findAndCopyImage(), readDir(), readFileOrDirectory(), and resolveSymlink().
| bool FileInfo::isWritable | ( | ) | const |
Definition at line 41 of file fileinfo.cpp.
References m_name.
|
inline |
Match the file name against a list of patterns.
The pattern list can be a list of strings or a list of objects that can be converted to strings. The pattern is matched against the file name, the file path and the absolute file path. If a match is found, the matching pattern is returned in elem (if not nullptr).
| patList | List of patterns to match against. |
| caseSenseNames | Whether to match case-sensitively or not. |
| elem | Pointer to store the matching pattern (optional). |
| getter | Function to convert pattern elements to strings (optional). |
Definition at line 60 of file fileinfo.h.
Referenced by checkAndOpenFile(), getEncoding(), and readDir().
| std::string FileInfo::readLink | ( | ) | const |
Definition at line 88 of file fileinfo.cpp.
References m_name.
Referenced by resolveSymlink().
| size_t FileInfo::size | ( | ) | const |
Definition at line 27 of file fileinfo.cpp.
References m_name.
Referenced by deliverablesPresent(), insertMapFile(), and readInputFile().
|
private |
Definition at line 108 of file fileinfo.h.
Referenced by absFilePath(), dirPath(), exists(), FileInfo(), fileName(), filePath(), isDir(), isExecutable(), isFile(), isReadable(), isRelative(), isSymLink(), isWritable(), readLink(), and size().