From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8459 invoked by alias); 22 Jul 2002 07:57:08 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 8427 invoked from network); 22 Jul 2002 07:57:07 -0000 Received: from unknown (HELO anchor-post-35.mail.demon.net) (194.217.242.85) by sources.redhat.com with SMTP; 22 Jul 2002 07:57:07 -0000 Received: from mailgate.softwire.co.uk ([62.49.203.138] helo=polarbear) by anchor-post-35.mail.demon.net with esmtp (Exim 3.36 #2) id 17WY41-0007Fs-0U; Mon, 22 Jul 2002 08:57:05 +0100 From: "Rupert Wood" To: "'danny'" Cc: Subject: RE: directories for newbies Date: Mon, 22 Jul 2002 00:57:00 -0000 Message-ID: <616BE6A276E3714788D2AC35C40CD18D5EC520@whale.softwire.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal In-Reply-To: <616BE6A276E3714788D2AC35C40CD18D71B3A6@whale.softwire.co.uk> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-SW-Source: 2002-07/txt/msg00218.txt.bz2 Danny wrote: > I'm look for a function to get me the attributes of a file. Such as is > the file a directory or not. Any ideas? Stat(); test for the S_IFDIR bit set in st_mode. See the manual pages for stat and the mknod function (in section 2 - not the mknod utility in section 1). Rup.