Function extension

Synopsis

#include <include/bitarchiveitem.hpp>

wstring extension() const

Description

Return
the extension of the item, if available or inferable from the name, or an empty string otherwise (e.g. when the item is a folder).

Source

Lines 52-58 in src/bitarchiveitem.cpp. Line 59 in include/bitarchiveitem.hpp.

wstring BitArchiveItem::extension() const {
    if ( isDir() ) {
        return L"";
    }
    BitPropVariant propvar = getProperty( BitProperty::Extension );
    return propvar.isEmpty() ? fsutil::extension( name() ) : propvar.getString();
}





Add Discussion as Guest

Log in