///////////////////////////////////////////////////////////////////////////
//    Copyright (C) 2014 Wizardry and Steamworks - License: GNU GPLv3    //
///////////////////////////////////////////////////////////////////////////
// Returns the number of free space (in bytes) on a partition bounded 
// by head and tail
integer wasPrimFSGetUsedSpace(integer head, integer tail) {
    integer occupied = 0;
    do {
        occupied += llStringLength(wasGetLinkDescription(tail));
    } while(--tail>=head);
    return occupied;
}