Don't forget that both files and subdirectories are objects in the parent 
folder.

We assign special meaning to "directory/folder", but the function returns 
information about the parent of the object.  

Rod


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Daniel
Blendea
Sent: Wednesday, February 14, 2007 8:11 AM
To: Bob Archer
Cc: nant-users@lists.sourceforge.net
Subject: Re: [NAnt-users] bug in path::get-directory-name()?


Indeed...

        [Function("get-directory-name")]
        public static string GetDirectoryName(string path) {
            string dirName = Path.GetDirectoryName(path);
            return StringUtils.ConvertNullToEmpty(dirName);
        }

the function is a wrapper around the equivalent .NET method.

so i take it that the only 2 options i have are:
1 - use string related functions
2 - extend nant....

Daniel

On 2/14/07, Bob Archer <[EMAIL PROTECTED]> wrote:
> You may want to get the code and look at the tests for this function.
> But, I assume it returns everything in a string prior to the final
> back(forward)slash. Since it returns a string the information is
> apparently just the path name.
>
> BOb
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Daniel
> Blendea
> Sent: Wednesday, February 14, 2007 10:48 AM
> To: nant-users@lists.sourceforge.net
> Subject: [NAnt-users] bug in path::get-directory-name()?
>
> Hi all,
>
> I'm trying to use path::get-directory-name(<path>) and if <path> is a
> directory
> the function returns the parent directory.
>
> Is this the correct behaviour? because i think it isn't.
>
> The description of the function is rather vague:
> "Returns the directory information for the specified path string. "
>
> What directory information? size? subfolders?
>
> Thank you for your reply.
> 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=DEVDE
> V
> _______________________________________________
> NAnt-users mailing list
> NAnt-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nant-users
>

-------------------------------------------------------------------------
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

-------------------------------------------------------------------------
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