recursion limit when creating file list of harddrive
Geoff Canyon
gcanyon at gmail.com
Thu Oct 29 08:49:26 EDT 2015
"there is a folder" and "there is a file" can distinguish between the two.
Obviously if you want to distinguish visually for the user, or to do it
without testing, then including the trailing "/" would work.
On Wed, Oct 28, 2015 at 1:51 PM, Michael Doub <mikedoub at gmail.com> wrote:
> 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 at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
More information about the use-livecode
mailing list