recursion limit when creating file list of harddrive
Michael Doub
mikedoub at gmail.com
Wed Oct 28 13:51:13 EDT 2015
When I saw that the output contained both directories and files, adding
the "/" allows you to
easily know that you are looking at a folder rather than a file.
put directoryListing(whatfolder) into foo
repeat for each line x of foo
if char -1 of x = "/" then
put x & cr after directoryList
else
put x & cr after fileList
end if
Given a random path that could be either a directory or a file, is there
a clever way to tell what you have?
-= Mike
On 10/28/15 10:55 AM, Geoff Canyon wrote:
> The trailing "/" is an interesting point. I checked and the "set the
> directory" command will happily take a trailing "/" or not, but when you
> "put the directory" you get no trailing "/"
>
> Given that, I'd probably leave it as is, and always assume that the
> description of a particular directory needs to have the "/" added when
> adding a filename or directoryname to it.
More information about the use-livecode
mailing list