bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

patch to document dir_* functions


From: James A Morrison
Subject: patch to document dir_* functions
Date: Sun, 10 Feb 2002 14:03:51 -0500 (EST)

2002-02-11     James A. Morrison  <ja2morri@student.math.uwaterloo.ca>

         * hurd.texi (Modifying Directories): Documented dir_mkfile, dir_mkdir
         dir_rmdir, dir_unlink, dir_link and dir_rename.

Index: hurd.texi
===================================================================
RCS file: /cvsroot/hurd/hurd/doc/hurd.texi,v
retrieving revision 1.20
diff -u -r1.20 hurd.texi
--- hurd.texi   12 Mar 2001 00:43:50 -0000      1.20
+++ hurd.texi   9 Feb 2002 22:34:29 -0000
@@ -2839,19 +3011,36 @@
 @node Modifying Directories
 @subsection Modifying Directories
 
-FIXME: Creating and deleting nodes
+@c FIXME: Creating and deleting nodes
+@c JM: I think I fixed this
 
-@code{dir_mkfile}
+Operations on directoriess can be done in the usual unix way using functions
+in glibc, or these simple operations for modifying directories can be done
+more directly with these functions using Hurd file_t descriptors of 
directories.
 
-@code{dir_mkdir}
+@deftypefun kern_return_t dir_mkfile (@w{file_t @var{directory}}, @w{int 
@var{flags}}, @w{mode_t @var{mode}}, @w{mach_port_t *@var{newnode}})
+Create a new file without linking it into the filesystem.  You still must have 
write permission on the specified directory, even though it will not actually 
be written.  Return in *@var{newnode} a port to the file.  Flags are the same 
as for @code{dir_lookup}, but @code{O_CREAT} and @code{O_TRUNC} are assumed 
even if not specified.
+@end deftypefun
+
+@deftypefun kern_return_t dir_mkdir (@w{file_t @var{directory}}, @w{char 
*@var{name}}, @w{mode_t @var{mode}})
+Create a new directory named @var{name} with permission specified by 
@var{mode}.
+@end deftypefun
 
-@code{dir_rmdir}
+@deftypefun kern_return_t dir_rmdir (@w{file_t @var{directory}}, @w{char 
*@var{name}})
+Remove the directory named @var{name}.
+@end deftypefun
 
-@code{dir_unlink}
+@deftypefun kern_return_t dir_unlink (@w{file_t @var{directory}}, @w{char 
*@var{name}})
+Remove/Unlink a non-directory.
+@end deftypefun
 
-@code{dir_link}
+@deftypefun kern_return_t dir_link (@w{file_t @var{directory}}, @w{file_t 
@var{file}}, @w{char *@var{name}}, @w{int @var{excl}})
+Create a hard link.  If @var{excl} is set and @var{name} already exists in 
@var{directory} then this function will fail.  If @var{excl} is not set and 
@var{name} already exists the old file named @var{name} will be unlinked.  If 
@var{directory} and @var{file} are not on the same filesystem then 
@code{dir_link} will probably fail with @code{EXDEV}.
+@end deftypefun
 
-@code{dir_rename}
+@deftypefun kern_return_t dir_rename (@w{file_t @var{olddirectory}}, @w{char 
*@var{oldname}}, @w{file_t @var{newdirectory}}, @w{char *@var{newname}}, @w{int 
@var{excl}})
+Rename a file from @var{olddirectory}/@var{oldname} to 
@var{newdirectory}/@var{newname}.   If @var{excl} is set and @var{newname} 
already exists in @var{newdirectory} then this function will fail.  If 
@var{excl} is not set and @var{newname} already exists the old file named 
@var{newname} will be unlinked.  If @var{olddirectory} and @var{newdirectory} 
are not on the same filesystem then @code{dir_rename} will probably fail with 
@code{EXDEV}.
+@end deftypefun
 
 @node Notifications
 @subsection Notifications
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]