Logo Search packages:      
Sourcecode: kdar version File versions  Download package

libdar::et_mask KDarConfig::libdarCreateFileMask (  ) 

Returns the full creation file mask.

Definition at line 2165 of file kdarConfig.cpp.

References fileMaskList(), fileMaskType(), and kdar::toStdString().

Referenced by createArchiveThread::run(), and kdarView::slotArchiveCreate().

{
    libdar::et_mask file_mask;
    libdar::ou_mask file_list;
    QStringList fileList = fileMaskList();
    //Iterate over the QStringList, adding the masks to the libdar::ou_mask
    for( QStringList::Iterator it = fileList.begin(); it != fileList.end(); ++it )
    {
// TODO handle caseSensitive:
        bool caseSensitive = false;
        file_list.add_mask( libdar::simple_mask( kdar::toStdString(*it), caseSensitive ) );
    }
    //If the file list contains items, add them to the file mask
    if ( !fileList.empty() )
    {
        //include
        if ( fileMaskType() == KDar::INCLUDE )
        {
            file_mask.add_mask( file_list );
        }
        //ignore
        else
        {
            file_mask.add_mask( libdar::bool_mask( true ) );
            file_mask.add_mask( libdar::not_mask( file_list ) );
        }
    }
    //otherwise, we compress everything
    else
    {
        file_mask.add_mask( libdar::bool_mask( true ) );
    }

    return file_mask;

}


Generated by  Doxygen 1.6.0   Back to index