dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/IO File.cs,1.10,1.11


From: Gopal.V <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/IO File.cs,1.10,1.11
Date: Fri, 20 Dec 2002 22:02:09 -0500

Update of /cvsroot/dotgnu-pnet/pnetlib/runtime/System/IO
In directory subversions:/tmp/cvs-serv6278/runtime/System/IO

Modified Files:
        File.cs 
Log Message:
Check for file existence without opening them


Index: File.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/runtime/System/IO/File.cs,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** File.cs     20 Dec 2002 04:39:56 -0000      1.10
--- File.cs     21 Dec 2002 03:02:06 -0000      1.11
***************
*** 172,190 ****
                public static bool Exists(string path) 
                {
!                       
!                       FileStream test;
! 
!                       try
!                       {
!                               test = Open(path, FileMode.Open);   
!                       }
!                       catch (Exception e) 
!                       {
!                               return false;
!                       } 
!                       
!                       test.Close();
!                       
!                       return true;
                }
                
--- 172,176 ----
                public static bool Exists(string path) 
                {
!                       return FileMethods.Exists(path);        
                }
                




reply via email to

[Prev in Thread] Current Thread [Next in Thread]