Changeset 64183e20 in rtems


Ignore:
Timestamp:
Sep 25, 1998, 8:11:51 PM (21 years ago)
Author:
Wade A Smith <warm38@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
389c3e9
Parents:
9a0b008
Message:

Documented the creat, scandir, and access routines.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/new_chapters/files.t

    r9a0b008 r64183e20  
    2020@item @code{readdir_r} -
    2121@item @code{rewinddir} -
    22 @item @code{scandir} -
     22@item @code{scandir} - Scan a directory for matching entries
    2323@item @code{telldir} -
    2424@item @code{closedir} -
     25@item @code{getdents}
    2526@item @code{chdir} - Changes the current working directory
    2627@item @code{getcwd} - Gets current working directory
    2728@item @code{open} - Opens a file
    28 @item @code{creat} -
     29@item @code{creat} - Create a new file or rewrite an existing one
    2930@item @code{umask} - Sets a file creation mask
    3031@item @code{link} - Creates a link to a file
     
    3233@item @code{mkfifo} -
    3334@item @code{unlink} - Removes a directory entry
    34 @item @code{rmdir} -
     35@item @code{rmdir} - Delete a directory
    3536@item @code{rename} - Renames a file
    3637@item @code{stat} - Gets information about a file.
     
    4041@item @code{fchmod} -
    4142@item @code{chown} - Changes the owner and/ or group of a file
    42 @item @code{utime} -
     43@item @code{utime} - Change access and/or modification times of an inode
    4344@item @code{ftrunctate} -
    4445@item @code{pathconf} -
     
    206207
    207208@page
    208 @subsection scandir -
    209 
    210 @subheading CALLING SEQUENCE:
    211 
    212 @ifset is-C
    213 @example
    214 int scandir(
    215 );
    216 @end example
    217 @end ifset
    218 
    219 @ifset is-Ada
    220 @end ifset
    221 
    222 @subheading STATUS CODES:
    223 
    224 @table @b
    225 @item E
    226 The
    227 
    228 @end table
    229 
    230 @subheading DESCRIPTION:
     209@subsection scandir - Scan a directory for matching entries
     210
     211@subheading CALLING SEQUENCE:
     212
     213@ifset is-C
     214@example
     215#include <dirent.h>
     216
     217int scandir(const char      *dir,
     218            struct direct ***namelist,
     219            int (*select)(const struct dirent *),
     220            int (*compar)(const struct dirent **, const struct dirent **)
     221);
     222@end example
     223@end ifset
     224
     225@ifset is-Ada
     226@end ifset
     227
     228@subheading STATUS CODES:
     229
     230@table @b
     231@item ENOMEM
     232Insufficient memory to complete the operation.
     233
     234@end table
     235
     236@subheading DESCRIPTION:
     237
     238The @code{scandir()} function scans the directory @code{dir}, calling
     239@code{select()} on each directory entry.  Entries for which @code{select()}
     240returns non-zero are stored in strings allocated via @code{malloc()},
     241sorted using @code{qsort()} with the comparison function @code{compar()},
     242and collected in array @code{namelist} which is allocated via @code{malloc()}.
     243If @code{select} is NULL, all entries are selected.
    231244
    232245@subheading NOTES:
     
    505518
    506519@page
    507 @subsection creat -
    508 
    509 @subheading CALLING SEQUENCE:
    510 
    511 @ifset is-C
    512 @example
    513 int creat(
    514 );
    515 @end example
    516 @end ifset
    517 
    518 @ifset is-Ada
    519 @end ifset
    520 
    521 @subheading STATUS CODES:
    522 
    523 @table @b
    524 @item E
    525 The
    526 
    527 @end table
    528 
    529 @subheading DESCRIPTION:
    530 
    531 @subheading NOTES:
     520@subsection creat - Create a new file or rewrite an existing one
     521
     522@subheading CALLING SEQUENCE:
     523
     524@ifset is-C
     525@example
     526#include <sys/types.h>
     527#include <sys/stat.h>
     528#include <fcntl.h>
     529
     530int creat(const char *path,
     531          mode_t      mode
     532);
     533@end example
     534@end ifset
     535
     536@ifset is-Ada
     537@end ifset
     538
     539@subheading STATUS CODES:
     540
     541@table @b
     542@item EEXIST
     543@code{Path} already exists and O_CREAT and O_EXCL were used.
     544@item EISDIR
     545@code{Path} refers to a directory and the access requested involved
     546writing
     547@item ETXTBSY
     548@code{Path} refers to an executable image which is currently being
     549executed and write access was requested
     550@item EFAULT
     551@code{Path} points outside your accessible address space
     552@item EACCES
     553The requested access to the file is not allowed, or one of the
     554directories in @code{path} did not allow search (execute) permission.
     555@item ENAMETOOLONG
     556@code{Path} was too long.
     557@item ENOENT
     558A directory component in @code{path} does not exist or is a dangling
     559symbolic link.
     560@item ENOTDIR
     561A component used as a directory in @code{path} is not, in fact, a
     562directory.
     563@item EMFILE
     564The process alreadyh has the maximum number of files open.
     565@item ENFILE
     566The limit on the total number of files open on the system has been
     567reached.
     568@item ENOMEM
     569Insufficient kernel memory was available.
     570@item EROFS
     571@code{Path} refers to a file on a read-only filesystem and write access
     572was requested
     573
     574@end table
     575
     576@subheading DESCRIPTION:
     577
     578@code{creat} attempts to create a file and return a file descriptor for
     579use in read, write, etc.
     580
     581@subheading NOTES: None
    532582
    533583The routine is implemented in Cygnus newlib.
     
    767817
    768818@page
    769 @subsection rmdir -
    770 
    771 @subheading CALLING SEQUENCE:
    772 
    773 @ifset is-C
    774 @example
    775 int rmdir(
    776 );
    777 @end example
    778 @end ifset
    779 
    780 @ifset is-Ada
    781 @end ifset
    782 
    783 @subheading STATUS CODES:
    784 
    785 @table @b
    786 @item E
    787 The
    788 
    789 @end table
    790 
    791 @subheading DESCRIPTION:
    792 
    793 @subheading NOTES:
     819@subsection rmdir - Delete a directory
     820
     821@subheading CALLING SEQUENCE:
     822
     823@ifset is-C
     824@example
     825#include <unistd.h>
     826
     827int rmdir(const char *pathname
     828);
     829@end example
     830@end ifset
     831
     832@ifset is-Ada
     833@end ifset
     834
     835@subheading STATUS CODES:
     836
     837@table @b
     838@item EPERM
     839The filesystem containing @code{pathname} does not support the removal
     840of directories.
     841@item EFAULT
     842@cdoe{Pathname} points ouside your accessible address space.
     843@item EACCES
     844Write access to the directory containing @code{pathname} was not
     845allowed for the process's effective uid, or one of the directories in
     846@code{pathname} did not allow search (execute) permission.
     847@item EPERM
     848The directory containing @code{pathname} has the stickybit (S_ISVTX)
     849set and the process's effective uid is neither the uid of the file to
     850be delected nor that of the director containing it.
     851@item ENAMETOOLONG
     852@code{Pathname} was too long.
     853@item ENOENT
     854A dirctory component in @code{pathname} does not exist or is a
     855dangling sybolic link.
     856@item ENOTDIR
     857@code{Pathname}, or a component used as a directory in @code{pathname},
     858is not, in fact, a directory.
     859@item ENOTEMPTY
     860@code{Pathname} contains entries other than . and .. .
     861@item EBUSY
     862@code{Pathname} is the current working directory or root directory of
     863some process
     864@item EBUSY
     865@code{Pathname} is the current directory or root directory of some
     866process.
     867@item ENOMEM
     868Insufficient kernel memory was available
     869@item EROGS
     870@code{Pathname} refers to a file on a read-only filesystem.
     871@itemELOOP
     872@code{Pathname} contains a reference to a circular symbolic link
     873
     874@end table
     875
     876@subheading DESCRIPTION:
     877
     878@code{rmdir} deletes a directory, whic must be empty
     879
     880
     881@subheading NOTES: None
    794882
    795883@page
     
    11371225
    11381226@page
    1139 @subsection utime -
    1140 
    1141 @subheading CALLING SEQUENCE:
    1142 
    1143 @ifset is-C
    1144 @example
    1145 int utime(
     1227@subsection utime - Change access and/or modification times of an inode
     1228
     1229@subheading CALLING SEQUENCE:
     1230
     1231@ifset is-C
     1232@example
     1233#include <sys/types.h>
     1234
     1235int utime(const char     *filename,
     1236          struct utimbuf *buf
     1237);
     1238@end example
     1239@end ifset
     1240
     1241@ifset is-Ada
     1242@end ifset
     1243
     1244@subheading STATUS CODES:
     1245
     1246@table @b
     1247@item EACCES
     1248Permission to write the file is denied
     1249@item ENOENT
     1250@code{Filename} does not exist
     1251
     1252@end table
     1253
     1254@subheading DESCRIPTION:
     1255
     1256@code{Utime} changes the access and modification times of the inode
     1257specified by @code{filename} to the @code{actime} and @code{modtime}
     1258fields of @code{buf} respectively.  If @code{buf} is NULL, then the
     1259access and modification times of the file are set to the current time. 
     1260
     1261@subheading NOTES:
     1262
     1263@page
     1264@subsection ftrunctate -
     1265
     1266@subheading CALLING SEQUENCE:
     1267
     1268@ifset is-C
     1269@example
     1270int ftrunctate(
    11461271);
    11471272@end example
     
    11641289
    11651290@page
    1166 @subsection ftrunctate -
    1167 
    1168 @subheading CALLING SEQUENCE:
    1169 
    1170 @ifset is-C
    1171 @example
    1172 int ftrunctate(
     1291@subsection pathconf -
     1292
     1293@subheading CALLING SEQUENCE:
     1294
     1295@ifset is-C
     1296@example
     1297int pathconf(
    11731298);
    11741299@end example
     
    11911316
    11921317@page
    1193 @subsection pathconf -
    1194 
    1195 @subheading CALLING SEQUENCE:
    1196 
    1197 @ifset is-C
    1198 @example
    1199 int pathconf(
     1318@subsection fpathconf -
     1319
     1320@subheading CALLING SEQUENCE:
     1321
     1322@ifset is-C
     1323@example
     1324int fpathconf(
    12001325);
    12011326@end example
     
    12171342@subheading NOTES:
    12181343
    1219 @page
    1220 @subsection fpathconf -
    1221 
    1222 @subheading CALLING SEQUENCE:
    1223 
    1224 @ifset is-C
    1225 @example
    1226 int fpathconf(
    1227 );
    1228 @end example
    1229 @end ifset
    1230 
    1231 @ifset is-Ada
    1232 @end ifset
    1233 
    1234 @subheading STATUS CODES:
    1235 
    1236 @table @b
    1237 @item E
    1238 The
    1239 
    1240 @end table
    1241 
    1242 @subheading DESCRIPTION:
    1243 
    1244 @subheading NOTES:
    1245 
Note: See TracChangeset for help on using the changeset viewer.