• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Determining the size of a directory Part 2
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Determining the size of a directory Part 2


  • Subject: Re: Determining the size of a directory Part 2
  • From: Andréas Saudemont <email@hidden>
  • Date: Mon, 25 Oct 2004 14:56:14 +0200

Hi Dominik,

I guess you should connect the output file handle of 'fromPipe' (as
returned by fileHandleForWriting), and not its input file handle, to
the standard output of 'duTool'. Then you can use 'fromDu' to read
data from the pipe.

By the way you're leaking memory in the following code:

> fromDu=[[NSFileHandle alloc]init];
> fromDu=[fromPipe fileHandleForReading];

And releasing 'duTool' and 'poolForSize' after returning won't be very helpful:

> return (unsigned long long)output;
> [duTool release];
> [poolForSize release];

Hope this helps,

Andréas

--
http://andreassaudemont.net/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Determining the size of a directory Part 2
      • From: Andréas Saudemont <email@hidden>
References: 
 >Determining the size of a directory Part 2 (From: Dominik Freyer <email@hidden>)

  • Prev by Date: Re: Determining the size of a directory Part 2
  • Next by Date: Re: Has anyone successfully linked the lastest source code for Celestia
  • Previous by thread: Re: Determining the size of a directory Part 2
  • Next by thread: Re: Determining the size of a directory Part 2
  • Index(es):
    • Date
    • Thread