www.digitalmars.com         C & C++   DMDScript  

D - BUG: linux phobos file chdir,mkdir,rmdir

reply Ant <duitoolkit yahoo.ca> writes:
on the linux version of phobos std.file functions
chdir,mkdir,rmdir
phobos has:
    if (std.c.linux.linux.XXdir(toStringz(pathname)) == 0)
    {
	throw new FileException(pathname, getErrno());
    }
but according to the manuals
On success these functions return 0
On error they return -1

Ant

##### example for chdir #########################
void chdir(char[] pathname)
{
    if (std.c.linux.linux.chdir(toStringz(pathname)) == 0)
    {
	throw new FileException(pathname, getErrno());
    }
}

man chdir:
RETURN VALUE
   On success, zero is returned.  
   On error, -1 is returned, and  errno  is  set  appropriately.
Nov 26 2003
parent "Walter" <walter digitalmars.com> writes:
Looks like I should fix that!
Nov 27 2003