withAllFilesDo:andDirectoriesDo:

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

withAllFilesDo:andDirectoriesDo:

Bert Freudenberg
(moving from newbies list)

On 2013-10-21, at 20:25, "David T. Lewis" <[hidden email]> wrote:

> This may be closer to what you are looking for:
>
>  FileDirectory default
>     withAllFilesDo: [:file | "Do something with the FileStream here"]
>     andDirectoriesDo: [:dir | "Do something with the FileDirectory here"].


Uh oh. So this actually opens all the files in all subdirectories? And doesn't close them? Don't we have something nicer?

- Bert -



Reply | Threaded
Open this post in threaded view
|

Re: withAllFilesDo:andDirectoriesDo:

David T. Lewis
> (moving from newbies list)
>
> On 2013-10-21, at 20:25, "David T. Lewis" <[hidden email]> wrote:
>
>> This may be closer to what you are looking for:
>>
>>  FileDirectory default
>>     withAllFilesDo: [:file | "Do something with the FileStream here"]
>>     andDirectoriesDo: [:dir | "Do something with the FileDirectory
>> here"].
>
>
> Uh oh. So this actually opens all the files in all subdirectories? And
> doesn't close them? Don't we have something nicer?
>

It is rather horrible now that you mention it.

Dave



Reply | Threaded
Open this post in threaded view
|

Re: withAllFilesDo:andDirectoriesDo:

Chris Muller-3
In reply to this post by Bert Freudenberg
OMG that needs to be fixed or deleted.

On Mon, Oct 21, 2013 at 1:51 PM, Bert Freudenberg <[hidden email]> wrote:

> (moving from newbies list)
>
> On 2013-10-21, at 20:25, "David T. Lewis" <[hidden email]> wrote:
>
>> This may be closer to what you are looking for:
>>
>>  FileDirectory default
>>     withAllFilesDo: [:file | "Do something with the FileStream here"]
>>     andDirectoriesDo: [:dir | "Do something with the FileDirectory here"].
>
>
> Uh oh. So this actually opens all the files in all subdirectories? And doesn't close them? Don't we have something nicer?
>
> - Bert -
>
>
>