Page 3 of 3

Re: Processing Semicolon

Posted: 19 Jun 2016 22:47
by highend

Code: Select all

function canFileBeCreated($file) {
    while ($i++ < gettoken($file, "count", "\") - 2) {
        if (exists(gettoken($file, -$i -1, "\", , 1)) == 1) {
            return False;
        }
    }
    return True;
}

    $file = "D:\x2\WwwComBr\wwwcombr25_01\linux\apache_1.3.24.tar.gz";
    if (canFileBeCreated($file)) {
        new($file, "file");
    }

Re: Processing Semicolon

Posted: 20 Jun 2016 20:08
by tiago
Thank you for the code, highend! :beer: