Jpp 21.0.0-rc.1-88-g0130508c4
the software that should make you happy
Loading...
Searching...
No Matches
JSUPPORT::JSingleFileScanner_t Struct Reference

Auxiliary base class for file name. More...

#include <JSingleFileScanner.hh>

Inheritance diagram for JSUPPORT::JSingleFileScanner_t:
JSUPPORT::JSingleFileScanner< JNullType >

Public Member Functions

 JSingleFileScanner_t ()
 Default constructor.
 
 JSingleFileScanner_t (const std::string &file_name)
 Constructor.
 
const std::string getFilename () const
 Get file name.
 

Detailed Description

Auxiliary base class for file name.

Definition at line 40 of file JSingleFileScanner.hh.

Constructor & Destructor Documentation

◆ JSingleFileScanner_t() [1/2]

JSUPPORT::JSingleFileScanner_t::JSingleFileScanner_t ( )
inline

Default constructor.

Definition at line 46 of file JSingleFileScanner.hh.

47 {}

◆ JSingleFileScanner_t() [2/2]

JSUPPORT::JSingleFileScanner_t::JSingleFileScanner_t ( const std::string & file_name)
inline

Constructor.

Parameters
file_namefile name

Definition at line 55 of file JSingleFileScanner.hh.

55 :
56 std::string(file_name)
57 {}

Member Function Documentation

◆ getFilename()

const std::string JSUPPORT::JSingleFileScanner_t::getFilename ( ) const
inline

Get file name.

This method constitutes a light weight wrapper to resolve symbolic links on the fly.

Returns
file name

Definition at line 66 of file JSingleFileScanner.hh.

67 {
68 using namespace std::filesystem;
69
70 path ps(static_cast<const std::string&>(*this));
71
72 if (is_symlink(ps)) {
73 ps = read_symlink(ps);
74 }
75
76 return ps.string();
77 }

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