Xref: utzoo comp.std.c:2160 comp.lang.c:23930 Path: utzoo!attcan!uunet!samsung!rex!ukma!beech From: beech@ms.uky.edu (Wayne Beech) Newsgroups: comp.std.c,comp.lang.c Subject: ansi c and directories Message-ID: <13295@s.ms.uky.edu> Date: 21 Nov 89 21:50:19 GMT Organization: U of Ky, Math. Sciences, Lexington KY Lines: 24 I think some people missed the point of my letter since the only responses i have gotten back have been on the order of "but not all operating systems have hierarchal file systems". this was my original letter: > Does anyone know the rationale behind not specifically defining a set of > functions to work with directories in ansi C; things like opendir(), > next_dir_entry(), isdir(), etc. if you are writing a program that works > with directories that is expected to run on unix and non-unix machines how > do you handle this? with a bunch of #ifdef UNIX #elif SOMEOTHERMACHINE ....? the names i made up were just examples.....if you were on a system such as cms then isdir() would be easy to write since it would also return FALSE. what i was getting at was most programs perform their work on files so it looks like there would have been something mentioned in the standard about handling routine actions on file systems, things like how do you get the names of files in a directory( or on a minidisk). -- ============================================================================= UUCP : !ukma!beech BITNET: beech@ukma DOMAIN: beech@ms.uky.edu