"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "libmonit/src/io/File.h" between
monit-5.27.2.tar.gz and monit-5.28.0.tar.gz

About: Monit is a utility for managing and monitoring processes, files, directories and filesystems (with automatic error recovery).

File.h  (monit-5.27.2):File.h  (monit-5.28.0)
skipping to change at line 204 skipping to change at line 204
*/ */
bool File_chmod(const char *file, mode_t perm); bool File_chmod(const char *file, mode_t perm);
/** /**
* Returns the permission bit pattern for the <code>file</code>. See also * Returns the permission bit pattern for the <code>file</code>. See also
* File_chmod(). * File_chmod().
* @param file An absolute file path * @param file An absolute file path
* @return An octal number specifying the permission set for this file * @return An octal number specifying the permission set for this file
* or -1 if the file does not exist * or -1 if the file does not exist
*/ */
mode_t File_mod(const char *file); int File_mod(const char *file);
/** /**
* Returns the current umask value for this process. Umask values are * Returns the current umask value for this process. Umask values are
* subtracted from the default permissions. Files and directories * subtracted from the default permissions. Files and directories
* are created with default permission set to 0666 and 0777 respectively. * are created with default permission set to 0666 and 0777 respectively.
* *
* Simply put, the umask value is a set of permission bits to turn back off * Simply put, the umask value is a set of permission bits to turn back off
* a file creation mode. When a file or directory is created, the permission * a file creation mode. When a file or directory is created, the permission
* bits specified are <i>anded</i> with the complement of the umask value to * bits specified are <i>anded</i> with the complement of the umask value to
* determine the actual bits that will be set. For instance, when a file is * determine the actual bits that will be set. For instance, when a file is
skipping to change at line 233 skipping to change at line 233
* 0777 & ~File_umask(). If File_umask() is 022 then; 0777 & ~022 = 0755 * 0777 & ~File_umask(). If File_umask() is 022 then; 0777 & ~022 = 0755
* </pre> * </pre>
* Here is a ruby on-liner to play with, to see how umask modifies default * Here is a ruby on-liner to play with, to see how umask modifies default
* permissions * permissions
* <pre> * <pre>
* ruby -e 'printf("%#o\n", (0666 & ~0022))' * ruby -e 'printf("%#o\n", (0666 & ~0022))'
* </pre> * </pre>
* See also http://en.wikipedia.org/wiki/Umask and umask(2) on Unix * See also http://en.wikipedia.org/wiki/Umask and umask(2) on Unix
* @return An octal number representing the umask value for this process * @return An octal number representing the umask value for this process
*/ */
mode_t File_umask(void); int File_umask(void);
/** /**
* Set the umask value for this process. The default value is 022, unless * Set the umask value for this process. The default value is 022, unless
* changed by the user. See also File_umask() * changed by the user. See also File_umask()
* @param mask The new umask value, as a 3 digit octal number, e.g. 007 * @param mask The new umask value, as a 3 digit octal number, e.g. 007
* @return The old umask value for this process * @return The old umask value for this process
*/ */
mode_t File_setUmask(mode_t mask); mode_t File_setUmask(mode_t mask);
/** /**
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)