lkml.org 
[lkml]   [1998]   [Jan]   [17]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: open problem
From(Aaron M. Ucko)
Date17 Jan 1998 11:55:36 -0500
Jason Watts <khg@m-net.arbornet.org> writes:

> 	If a dir is nothing but a file with dir entries, with its own
> inode etc., why wasn't an open system call implemented for directories?

It is.  Most Linux file systems fail with EISDIR if you try to read(2)
from a directory; you should use readdir(3) or getdents(2) instead,
rather than concerning yourself with the physical layout for whatever
file system type you're using.

-- 
Aaron M. Ucko <amu@mit.edu> (finger amu@monk.mit.edu) [Stark raving sane]

\
 
 \ /
  Last update: 2005-03-22 12:41    [from the cache]
©2003-2008