[haiku-development] Re: RFC: find_directory() API extension

  • From: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sat, 02 Nov 2013 21:58:49 +0100

Am 01/11/2013 16:23, schrieb Ingo Weinhold:
On 11/01/2013 10:35 AM, Axel Dörfler wrote:
Will non-packaged applications only get non-packaged paths this way?
find_paths() is independent of the caller. find_path() should return a
non-packaged path, iff codePointer refers to a non-packaged object.

But isn't it actually is yourself you care about the most? :-)
I mean, isn't it possible to determine the type of directories you want to get by the path of the executable of the current team?

Also, couldn't find_directory() have the same magic, and return always the correct directory?

As an alternative for find_path():
[BPathFinder]

Works for me.

Regarding find_paths(), I'm not sure it's worth doing a separate class
for it just for getting the paths. The only optional parameters are
subPath and flags and I think both will be commonly used.

I would just put it into the BPathFinder class as well, to have it all in one place.

For convenience I was thinking of a BMergedDirectory initializer or
AddDirectories() method that would add paths found this way. It would be
nice to have a sub or wrapper class that would also add the node
monitoring support often needed.

Sounds lovely :-)
When will it be ready? ;-)

Bye,
   Axel.

Other related posts: