///////////////////////////////////////////////////////////////////////////
//    Copyright (C) 2014 Wizardry and Steamworks - License: GNU GPLv3    //
///////////////////////////////////////////////////////////////////////////
// Returns a list containing all unique file descriptors.
list wasPrimFSGetDescriptors(integer head, integer tail) {
    list descriptors = [];
    do {
        string d = wasGetLinkDescription(tail);
        if(llStringLength(d) == 0) jump continue;
        list c = llList2ListStrided(
            llParseString2List(d, ["&", "="], []), 
            0, -1, 2
        );
        // GC
        d = "";
        do {
            string k = llList2String(c, 0);
            if(llListFindList(
                descriptors, (list)k
                    ) != -1) jump skip;
            descriptors += k;
            // GC
            k = "";
@skip;
            c = llDeleteSubList(c, 0, 0);
        } while(llGetListLength(c) != 0);
        // GC
        c = [];
@continue;
    } while(--tail>=head);
    return descriptors;
}

secondlife/primfs_and_primdrive/primfs/get_descriptors.txt · Last modified: 2017/02/22 18:30 (external edit)

Access website using Tor


For the copyright, license, warranty and privacy terms for the usage of this website please see the license and privacy pages.