From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,5b6c0617bc7b14d2 X-Google-Attributes: gid103376,public From: Vadim Godunko Subject: Re: Checking file permissions Date: 2000/03/11 Message-ID: <38CA42A8.4C233D55@rc.rost.ru>#1/1 X-Deja-AN: 596075953 Content-Transfer-Encoding: 7bit References: X-Accept-Language: ru, en Content-Type: text/plain; charset=us-ascii X-Complaints-To: news-abuse@rosnet.net X-Trace: bison.rosnet.ru 952782836 10493 195.96.190.228 (11 Mar 2000 13:53:56 GMT) Organization: Russian Telecommunication Network Mime-Version: 1.0 NNTP-Posting-Date: 11 Mar 2000 13:53:56 GMT Newsgroups: comp.lang.ada Date: 2000-03-11T13:53:56+00:00 List-Id: Preben Randhol wrote: > Is it possible to check if a file is read and/or writable before trying > to open it? I have found a check that checks if a file is a regular > file (in GNAT), but I cannot find in the RM any function that (I understood) can > be used to check if a file is readable. > > System: Linux 2.2.x > Compiler: Gnat 3.12p > Language: Ada95 > > Any hints much appreciated. > > -- > Preben Randhol -- [randhol@pvv.org] -- [http://www.pvv.org/~randhol/] > "Det eneste trygge stedet i verden er inne i en fortelling." > -- Athol Fugard For check file attributes (read, write, executable) you may use Ada-POSIX bindings, for example Florist (ftp://ftp.cs.nyu.edu/pub/gnat/florist).