[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/IO Directory.cs,1.3,1.
From: |
Charlie Carnow <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/IO Directory.cs,1.3,1.4 |
Date: |
Sun, 10 Nov 2002 22:43:18 -0500 |
Update of /cvsroot/dotgnu-pnet//pnetlib/runtime/System/IO
In directory subversions:/tmp/cvs-serv24419/runtime/System/IO
Modified Files:
Directory.cs
Log Message:
Implemented System.IO.Directory.Exists(System.String)
Index: Directory.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet//pnetlib/runtime/System/IO/Directory.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** Directory.cs 27 Oct 2002 20:31:57 -0000 1.3
--- Directory.cs 11 Nov 2002 03:43:16 -0000 1.4
***************
*** 89,96 ****
}
- [TODO]
public static bool Exists(string path)
{
! return false;
}
--- 89,120 ----
}
public static bool Exists(string path)
{
! if(path.Length==0 || (path.Trim()).Length==0 ||
path.IndexOfAny(pathinfo.invalidPathChars)!= -1)
! {
! throw new ArgumentException();
! }
! if (path == null)
! {
! return false;
! }
! long ac;
! Errno errno = DirMethods.GetLastAccessTime(path,ac);
! switch(errno)
! {
! case Errno.Success:
! return true;
! case Errno.ENOENT:
! throw new
DirectoryNotFoundException(_("IO_DirNotFound"));
! case Errno.ENOTDIR:
! return false;
! case Errno.EACCES:
! return false;
! case Errno.ENAMETOOLONG:
! throw new PathTooLongException();
! default:
! return false;
! }
!
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/IO Directory.cs,1.3,1.4,
Charlie Carnow <address@hidden> <=