rsked/source.cc
/// Set argument eff_path to the fully expanded pathname or URL.
/// If dynamic we must expand any strftime symbols in the path
/// If the resource is a local file, directory or playlist, check its existence.
/// Return false if we can show this path does not exist, else return true.
///
/// * Will NOT throw.
///
Set argument eff_path to the fully expanded pathname or URL.
If dynamic we must expand any strftime symbols in the path
If the resource is a local file, directory or playlist, check its existence.
Return false if we can show this path does not exist, else return true.

Will NOT throw.
Set argument eff_path to the fully expanded pathname or URL . If dynamic we must expand any strftime symbols in the path If the resource is a local file directory or playlist check its existence . Return false if we can show this path does not exist else return true . Will NOT throw .
bool Source::res_path(boost::filesystem::path &eff_path)
{
    bool pexists {true};
    if (not m_dynamic) {
        eff_path = m_res_path;  
    } else {
        time_t rawtime;
        time(&rawtime);
        tm *timeinfo = localtime(&rawtime);
        char timebuf[256] = {0};
        if (strftime(timebuf,sizeof(timebuf)-1, m_res_path.c_str(),timeinfo)) {
            eff_path = boost::filesystem::path(timebuf);
        }
    }
    if (localp()) {    
        pexists = exists( eff_path );
        if (not pexists) {
            LOG_WARNING(Lgr) << eff_path << " is not found";
        }
    }
    return pexists;
}
bool Source :: res_path ( boost :: filesystem :: path & eff_path ) { bool pexists { true } ; if ( not m_dynamic ) { eff_path = m_res_path ; } else { time_t rawtime ; time ( & rawtime ) ; tm * timeinfo = localtime ( & rawtime ) ; char timebuf [ 256 ] = { 0 } ; if ( strftime ( timebuf , sizeof ( timebuf ) - 1 , m_res_path . c_str ( ) , timeinfo ) ) { eff_path = boost :: filesystem :: path ( timebuf ) ; } } if ( localp ( ) ) { pexists = exists ( eff_path ) ; if ( not pexists ) { LOG_WARNING ( Lgr ) << eff_path << " " ; } } return pexists ; }
Set argument eff_path to the fully expanded pathname or URL.
Set argument eff_path to the fully expanded pathname or URL .
// '~' was already expanded to $HOME // check if local resource actually exists