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 

Get all files in dir, fully qualified

    all-files: func [
        {Returns a block of fully qualified filenames for the directory.}
        spec  [file!]   "Starting Directory"
        block [block!]  "Block to append to"
        /deep           "Recurse sub-directories."
        /local f-spec
    ][
        spec: dirize spec
        foreach file read spec [
            f-spec: join spec file
            either all [deep dir? f-spec] [
                all-files/deep f-spec block
            ][
                append block f-spec
            ]
        ]
        block
    ]
« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS