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

Return block of files, all dirs first (See related posts)

    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
        ]
    ]

You need to create an account or log in to post comments to this site.


Click here to browse all 5140 code snippets

Related Posts