comparison libinterp/corefcn/file-io.cc @ 20198:b597bd161a5f stable

doc: Document that mkfifo's mode argument is in decimal (bug #45054). * dirfns.cc (Fmkdir): Document that umask is applied to the mode bits of a newly created directory. * file-io.cc (Ffopen): Document that umask is applied to the mode bits of a newly created file. * file-io.cc (Fumask): Add brief explanation of umask and UNIX permission bits. * syscalls.cc (Fmkfifo): Document that mode is in decimal and subject to umask processing.
author Rik <rik@octave.org>
date Sun, 17 May 2015 09:45:54 -0700
parents 4f45eaf83908
children d9f35ceff9e1 f02c22f71cdb
comparison
equal deleted inserted replaced
20194:b0f7ee81d974 20198:b597bd161a5f
680 @end table\n\ 680 @end table\n\
681 \n\ 681 \n\
682 @noindent\n\ 682 @noindent\n\
683 however, conversions are currently only supported for @samp{native}\n\ 683 however, conversions are currently only supported for @samp{native}\n\
684 @samp{ieee-be}, and @samp{ieee-le} formats.\n\ 684 @samp{ieee-be}, and @samp{ieee-le} formats.\n\
685 @seealso{fclose, fgets, fgetl, fscanf, fread, fputs, fdisp, fprintf, fwrite, fskipl, fseek, frewind, ftell, feof, ferror, fclear, fflush, freport}\n\ 685 \n\
686 When opening a new file that does not yet exist, permissions will be set to\n\
687 @code{0666 - @var{umask}}.\n\
688 @seealso{fclose, fgets, fgetl, fscanf, fread, fputs, fdisp, fprintf, fwrite, fskipl, fseek, frewind, ftell, feof, ferror, fclear, fflush, freport, umask}\n\
686 @end deftypefn") 689 @end deftypefn")
687 { 690 {
688 octave_value_list retval; 691 octave_value_list retval;
689 692
690 retval(0) = -1.0; 693 retval(0) = -1.0;
2237 \n\ 2240 \n\
2238 The parameter @var{mask} is an integer, interpreted as an octal number.\n\ 2241 The parameter @var{mask} is an integer, interpreted as an octal number.\n\
2239 \n\ 2242 \n\
2240 If successful, returns the previous value of the mask (as an integer to be\n\ 2243 If successful, returns the previous value of the mask (as an integer to be\n\
2241 interpreted as an octal number); otherwise an error message is printed.\n\ 2244 interpreted as an octal number); otherwise an error message is printed.\n\
2242 @seealso{fopen, mkdir}\n\ 2245 \n\
2246 The permission mask is a UNIX concept used when creating new objects on a\n\
2247 file system such as files, directories, or named FIFOs. The object to be\n\
2248 created has base permissions in an octal number @var{mode} which are\n\
2249 modified according to the octal value of @var{mask}. The final permissions\n\
2250 for the new object are @code{@var{mode} - @var{mask}}.\n\
2251 @seealso{fopen, mkdir, mkfifo}\n\
2243 @end deftypefn") 2252 @end deftypefn")
2244 { 2253 {
2245 octave_value_list retval; 2254 octave_value_list retval;
2246 2255
2247 int status = 0; 2256 int status = 0;