Function GetProperty

Synopsis

#include <include/fileupdatecallback.hpp>

STDMETHOD() GetProperty(UInt32 index, PROPID propID, PROPVARIANT *value)

Description

IArchiveUpdateCallback2.

debug purposes

Source

Lines 67-104 in src/fileupdatecallback.cpp. Line 47 in include/fileupdatecallback.hpp.

HRESULT FileUpdateCallback::GetProperty( UInt32 index, PROPID propID, PROPVARIANT* value ) {
    BitPropVariant prop;
    if ( propID == kpidIsAnti ) {
        prop = false;
    } else if ( index < mOldArcItemsCount ) {
        prop = mOldArc->getItemProperty( index, static_cast< BitProperty >( propID ) );
    } else {
        const FSItem& new_item = mNewItems[ index - mOldArcItemsCount ];
        switch ( propID ) {
            case kpidPath:
                prop = new_item.inArchivePath();
                break;
            case kpidIsDir:
                prop = new_item.isDir();
                break;
            case kpidSize:
                prop = new_item.size();
                break;
            case kpidAttrib:
                prop = new_item.attributes();
                break;
            case kpidCTime:
                prop = new_item.creationTime();
                break;
            case kpidATime:
                prop = new_item.lastAccessTime();
                /*wcout << L"dirItem " << dirItem.name()
                      << " last access time: " << to_string( dirItem.lastAccessTime() ) << endl;*/
                break;
            case kpidMTime:
                prop = new_item.lastWriteTime();
                break;
        }
    }

    *value = prop;
    return S_OK;
}





Add Discussion as Guest

Log in