Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS 

Return block of files, all dirs first

    dir-file-sort: func [
        {Returns the block of files with directories first, followed by
        files, with each group sorted.}
        block [any-block!]
        /local result
    ][
        result: copy []
        foreach blk lib/ser/split block [:dir?] none [
            append result sort blk
        ]
    ]
« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS