Re: TSystem::::AccessPathName

From: Valery Fine (fine@bnl.gov)
Date: Wed Aug 26 1998 - 17:47:40 MEST


On 26 Aug 98 at 16:16, Rene Brun wrote:


> My understanding is that AccessPathname returns a status flag.
> The general convention is that if everything OK, the status flag is
> 0, otherwise it is 1.

   Well but this puzzle users (Everyday I am being asked " Why 
gSystem.Load == kFALSE means the sharelib has been loaded succefully 
?")

  May be instead of Bool_t these functions should return Status_t ?

Status_t TSystem::AccessPathName(const char *path, EAccessMode 
mode)

  return kOK;
  return kFAILED;


  I'd like to mention that "man  access" says:

RETURN VALUES

       If the requested access is  permitted,  access()  succeeds and
       returns 0.  Otherwise, -1 is returned and errno is set to
       indicate the error.


  So I still think it will be more logical to return 

       Status_t kOk = 0 
  and  
       Status_t kFAILED = -1.    
                                    Valery
=================================================================
Dr. Valeri Faine (Fine)
    -------------------          Phone: +1 516 344 7806
Brookhaven National Laboratory   FAX  : +1 516 344 4206
Bldg. 510A /STAR                 mailto:fine@bnl.gov
Upton, New York, 11973-5000      http://nicewww.cern.ch/~fine
USA
                                 
Dr. Valery Fine                  Telex : 911621 dubna su
    -----------
LCTA/Joint Inst.for Nuclear Res. Phone : +7 09621 6 40 80
141980 Dubna, Moscow region      Fax   : +7 09621 6 51 45
Russia                           mailto:fine@main1.jinr.dubna.su                              



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:36 MET