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.
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode