As Daniel pointed out earlier in this thread path::get-directory-name is
just a wrapper around Path.GetDirectoryName() so it would be entirely
inconsistent to change it's behavior.  Most NAnt functions are wrappers
around .NET functions, they should do exactly what the .NET function does,
as is true in this case.

If you need something custom write a custom function.  That's what you'd do
in .NET code, so do the same in NAnt.

HTH,

Sam

-------------------------------------------
We're Hiring! Seeking a passionate developer to join our team building Flex
based products. Position is in the Washington D.C. metro area. If interested
contact [EMAIL PROTECTED]

 
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Daniel
Blendea
Sent: Thursday, February 15, 2007 3:44 AM
To: nant-users@lists.sourceforge.net
Subject: Re: [NAnt-users] bug in path::get-directory-name()?

I just tried and not producing the expected result..

path::get-directory-name("c:\my-folder\") returns the full path of the
parent folder
and
path::get-directory-name("c:\my-folder\*.*") returns the full path of
the folder.

In this example, the result would have been "my-folder".

I still believe that if the function is called "get-directory-name",
it should return the name of the directory both if the path is a
directory and if the path is a file.

Since the string::substring() doesn't have a overload in which i
shouldn't provide the length of the substring, I think I'll make a
path function that would provide the directory info i need.

Cheers,
Daniel



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to