[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn_client_ls - how can I tell file from dir

From: Ben Reser <ben_at_reser.org>
Date: 2004-03-25 02:12:49 CET

On Wed, Mar 24, 2004 at 04:58:23PM -0800, Ben Reser wrote:
> If you get one entry in the hash the entry could be a reply to a file or
> a directory target. You'll need to look at the svn_dirent_t listing for
> the kind entry for the single hash entry. That'll give you your answer
> there.

Correction, you have to look at the keyname to see if it matches the
target you requested in this case. A reply to a directory with one
entry or a file could both potentially return a single file.

However, even then you can still run into a ambiguity issue. If you
have a dir named foo with a file named foo in it, is the foo you asked
for a dir or a file? I don't think there's a way to find out.

-- 
Ben Reser <ben@reser.org>
http://ben.reser.org
"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Mar 25 02:13:09 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.