🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #6317

Read Directory - File

#6317
From: Pieter
Date: Wed, 25 May 2005 17:38
11 lines
1284 bytes

   Hello,

Please, I have two questions which I like to ask here:

1) I want to read all the files contained in a given directory. Which API should I use? Also if I want to read only the files with a certain extension.

2) In a file there are multiple lines. I want to read a line in that file, do something with it and move to the next one till the end of the file. What is the best way to do that and I will apreciate it if you can provide me with code example.

Thank you all
Technical Details
Message-ID: <4294b813$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,57ff8ac7d09a7b63,start
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Pieter" <nospam@nospam.com>
Sender: "Pieter" <nospam@nospam.com>
Reply-To: "Pieter" <nospam@nospam.com>
Subject: Read Directory - File
Newsgroups: borland.public.cppbuilder.nativeapi
X-User-Info: 62.177.189.75     
NNTP-Posting-Host: 207.105.83.66
Message-ID: <4294b813$1@newsgroups.borland.com>
Date: 25 May 2005 10:38:27 -0700
X-Trace: newsgroups.borland.com 1117042707 207.105.83.66 (25 May 2005 10:38:27 -0700)
Lines: 12
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail