1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/genericopenlibs/openenvcore/include/sys/stat.dosc Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,1034 @@
1.4 +/** @file ../include/sys/stat.h
1.5 +@internalComponent
1.6 +*/
1.7 +
1.8 +/** @fn chmod(const char *_path, mode_t _mode)
1.9 +@param _path
1.10 +@param _mode
1.11 +
1.12 +Note: This description also covers the following functions -
1.13 + fchmod() lchmod()
1.14 +
1.15 +@return Upon successful completion, the value 0 is returned; otherwise the
1.16 +value -1 is returned and the global variable errno is set to indicate the
1.17 +error.
1.18 +
1.19 +@code
1.20 + #include < sys/stat.h > :
1.21 +@endcode
1.22 + The file permission bits of the file named specified by _path or referenced by the file descriptor fd are changed to _mode. The chmod system call verifies that the process owner (user) either owns
1.23 +the file specified by _path (or fd ),
1.24 +or
1.25 +is the super-user.
1.26 +The chmod system call follows symbolic links to operate on the target of the link
1.27 +rather than the link itself.
1.28 +
1.29 + The lchmod system call is similar to chmod but does not follow symbolic links.
1.30 +
1.31 + A mode is created from ored permission bit masks
1.32 +defined in \#include \<sys/stat.h\> :
1.33 +
1.34 +@code
1.35 +#define S_IRWXU 0000700 // RWX mask for owner
1.36 +#define S_IRUSR 0000400 // R for owner
1.37 +#define S_IWUSR 0000200 // W for owner
1.38 +#define S_IXUSR 0000100 // X for owner
1.39 +#define S_IRWXG 0000070 // RWX mask for group
1.40 +#define S_IRGRP 0000040 // R for group
1.41 +#define S_IWGRP 0000020 // W for group
1.42 +#define S_IXGRP 0000010 // X for group
1.43 +#define S_IRWXO 0000007 // RWX mask for other
1.44 +#define S_IROTH 0000004 // R for other
1.45 +#define S_IWOTH 0000002 // W for other
1.46 +#define S_IXOTH 0000001 // X for other
1.47 +#define S_ISUID 0004000 // set user id on execution
1.48 +#define S_ISGID 0002000 // set group id on execution
1.49 +#ifndef __BSD_VISIBLE
1.50 +#define S_ISTXT 0001000 // sticky bit
1.51 +#endif
1.52 +@endcode
1.53 +
1.54 + Notes :
1.55 +
1.56 + Sticky bit and set id on execution are not supported.
1.57 +
1.58 + Permission values for group and others are ignored as there is no concept of
1.59 + group and others on the Symbian OS.
1.60 + The flag bits S_IXUSR, S_IXGRP & S_IXOTH are ignored as execute permissions on a file are meaningless on Symbian OS.
1.61 +
1.62 + An attempt to change file permission to write-only changes the file permission
1.63 + to read-write.
1.64 +
1.65 +Either or both of S_IRUSR or S_IWUSR bits must be set in the _mode argument, else chmod fails with EINVAL.
1.66 +
1.67 + Permissions for directories are ignored.
1.68 +
1.69 + 000 mode is treated as invalid mode as Symbian OS cannot have entries with
1.70 + both read and write permissions absent.
1.71 +
1.72 +
1.73 +
1.74 +Examples:
1.75 +@code
1.76 +/*Detailed description: This test code demonstartes usage of chmod system call, it
1.77 + * changes mode of file Example.txt in the current working directory to read-only.
1.78 + * Preconditions: Example.txt file should be present in the current working directory.
1.79 + */
1.80 +int main()
1.81 +{
1.82 + if(chmod("Example.txt" , 0444) < 0 )
1.83 + {
1.84 + printf("change mode of file Example.txt failed");
1.85 + return -1;
1.86 + }
1.87 + printf("Chmod system call successful");
1.88 + return 0;
1.89 +}
1.90 +
1.91 +@endcode
1.92 + Output
1.93 +@code
1.94 +Chmod system call successful
1.95 +
1.96 +@endcode
1.97 +@code
1.98 +/* Detailed description : This sample code demonstrates the usage of fchmod system call, this code
1.99 + * changes mode of file Example.txt using fchmod system call.
1.100 + */
1.101 +#include <sys/types.h>
1.102 +#include <sys/stat.h>
1.103 +#include <fcntl.h>
1.104 +int main()
1.105 +{
1.106 + int fd = 0;
1.107 + fd = open("Example.txt" , O_CREAT | O_RDWR , 0666);
1.108 + if(fd < 0 ) {
1.109 + printf("Failed to open file Example.txt");
1.110 + return -1;
1.111 + }
1.112 + if(fchmod(fd , 0444) < 0 ) {
1.113 + printf("fchmod failed to change mode of file Example.txt");
1.114 + return -1;
1.115 + }
1.116 + printf("Fchmod call changed mode of Example.txt");
1.117 + return 0;
1.118 +}
1.119 +
1.120 +@endcode
1.121 + Output
1.122 +@code
1.123 +Fchmod call changed mode of Example.txt
1.124 +
1.125 +@endcode
1.126 +
1.127 +Limitations:
1.128 +
1.129 +KErrNotReady of Symbian error code is mapped to ENOENT, which typically means drive
1.130 +not found or filesystem not mounted on the drive.
1.131 +
1.132 +@see chmod()
1.133 +@see chown()
1.134 +@see open()
1.135 +@see stat()
1.136 +
1.137 +
1.138 +
1.139 +@capability Deferred @ref RFs::SetAtt(const TDesC16&, unsigned, unsigned)
1.140 +
1.141 +@publishedAll
1.142 +@externallyDefinedApi
1.143 +*/
1.144 +
1.145 +/** @fn fchmod(int fd, mode_t _mode)
1.146 +@param fd
1.147 +@param _mode
1.148 +
1.149 +Refer to chmod() for the documentation
1.150 +
1.151 +@see chmod()
1.152 +@see chown()
1.153 +@see open()
1.154 +@see stat()
1.155 +
1.156 +
1.157 +
1.158 +
1.159 +@publishedAll
1.160 +@externallyDefinedApi
1.161 +*/
1.162 +
1.163 +/** @fn fstat(int fd, struct stat *st)
1.164 +@param fd
1.165 +@param st
1.166 +
1.167 +Refer to stat() for the documentation
1.168 +
1.169 +Notes:
1.170 +
1.171 +If 'fd' refers to a shared memory object, the implementation updates only the st_uid, st_gid, st_size,
1.172 +and st_mode fields in the stat structure pointed to by the 'st' argument .
1.173 +
1.174 +@see access()
1.175 +@see chmod()
1.176 +@see chown()
1.177 +@see utimes()
1.178 +@see symlink()
1.179 +
1.180 +
1.181 +
1.182 +
1.183 +@publishedAll
1.184 +@externallyDefinedApi
1.185 +*/
1.186 +
1.187 +/** @fn fstat64(int fd, struct stat64 *st)
1.188 +@param fd
1.189 +@param st
1.190 +
1.191 +For full documentation see: http://www.unix.org/version2/whatsnew/lfs20mar.html#3.0
1.192 +
1.193 +@see fstat()
1.194 +
1.195 +@publishedAll
1.196 +@externallyDefinedApi
1.197 +*/
1.198 +
1.199 +
1.200 +/** @fn lstat(const char *file_name, struct stat *buf)
1.201 +@param file_name
1.202 +@param buf
1.203 +
1.204 +Refer to stat() for the documentation
1.205 +
1.206 +@see access()
1.207 +@see chmod()
1.208 +@see chown()
1.209 +@see utimes()
1.210 +@see symlink()
1.211 +
1.212 +
1.213 +
1.214 +@capability Deferred @ref RFs::Entry(const TDesC16&, TEntry&)
1.215 +
1.216 +@publishedAll
1.217 +@externallyDefinedApi
1.218 +*/
1.219 +
1.220 +/** @fn lstat64(const char *file_name, struct stat64 *buf)
1.221 +@param file_name
1.222 +@param buf
1.223 +
1.224 +For full documentation see: http://www.unix.org/version2/whatsnew/lfs20mar.html#3.0
1.225 +
1.226 +@see lstat()
1.227 +
1.228 +@publishedAll
1.229 +@externallyDefinedApi
1.230 +*/
1.231 +
1.232 +/** @fn __xstat(int, const char *file, struct stat *buf)
1.233 +@param file
1.234 +@param buf
1.235 +
1.236 +Refer to stat() for the documentation
1.237 +
1.238 +@see access()
1.239 +@see chmod()
1.240 +@see chown()
1.241 +@see utimes()
1.242 +@see symlink()
1.243 +
1.244 +
1.245 +
1.246 +
1.247 +@publishedAll
1.248 +@released
1.249 +*/
1.250 +
1.251 +/** @fn __xstat64(int, const char *file, struct stat64 *buf)
1.252 +@param file
1.253 +@param buf
1.254 +
1.255 +For full documentation see: http://www.unix.org/version2/whatsnew/lfs20mar.html#3.0
1.256 +
1.257 +@see __xstat()
1.258 +
1.259 +@publishedAll
1.260 +@released
1.261 +*/
1.262 +
1.263 +/** @fn __lxstat(int, const char *file, struct stat *buf)
1.264 +@param file
1.265 +@param buf
1.266 +
1.267 +Refer to stat() for the documentation
1.268 +
1.269 +@see access()
1.270 +@see chmod()
1.271 +@see chown()
1.272 +@see utimes()
1.273 +@see symlink()
1.274 +
1.275 +
1.276 +
1.277 +
1.278 +@publishedAll
1.279 +@released
1.280 +*/
1.281 +
1.282 +/** @fn __lxstat64(int, const char *file, struct stat64 *buf)
1.283 +@param file
1.284 +@param buf
1.285 +
1.286 +For full documentation see: http://www.unix.org/version2/whatsnew/lfs20mar.html#3.0
1.287 +
1.288 +@see __lxstat()
1.289 +
1.290 +@publishedAll
1.291 +@released
1.292 +*/
1.293 +
1.294 +
1.295 +/** @fn mkdir(const char *_path, mode_t _mode)
1.296 +@param _path
1.297 +@param _mode
1.298 +@return The mkdir() function returns the value 0 if successful; otherwise the
1.299 +value -1 is returned and the global variable errno is set to indicate the
1.300 +error.
1.301 +
1.302 + The directory _path is created with the access permissions specified by _mode.
1.303 +
1.304 + Notes:
1.305 +
1.306 + _mode values and access permissions are ignored in Symbian OS.
1.307 +
1.308 + The default working directory of a process is initialized to C: \\private\\U ID
1.309 + (UID of the calling application) and any data written into this directory persists between phone resets.
1.310 +
1.311 + The parent directory's time stamp is not updated when a new child is created.
1.312 +
1.313 + The newly created directory will be empty (i.e. it doesn't have "." and
1.314 + ".." entries)
1.315 +
1.316 +Examples:
1.317 +@code
1.318 +/* Detailed description : This test code demonstrates usage of mkdir systemcall,
1.319 + * it creates function a directory Example in current working directory.
1.320 + */
1.321 +int main()
1.322 +{
1.323 + if(mkdir("Example" , 0666) < 0 )
1.324 + {
1.325 + printf("Directory creation failed");
1.326 + return -1;
1.327 + }
1.328 + printf("Directory Example created");
1.329 + return 0;
1.330 +}
1.331 +
1.332 +@endcode
1.333 + Output
1.334 +@code
1.335 +Directory Example created
1.336 +
1.337 +@endcode
1.338 +
1.339 +Limitations:
1.340 +
1.341 +The path parameter in mkdir() should not exceed 256 characters in length.
1.342 +
1.343 +KErrNotReady of Symbian error code is mapped to ENOENT, which typically means drive
1.344 +not found or filesystem not mounted on the drive.
1.345 +
1.346 +The path given to mkdir() should be complete. Attempting to create a directory my calling mkdir("logs",0400|0200|0100)
1.347 +will pass on emulator but fails on h/w because the cwd is taken as c:\private\uid3 on emulator and
1.348 +z:\private\uid3 on h/w. Since Z drive is a rom on h/w, mkdir() fails by setting errno to 13 on hardware.
1.349 +
1.350 +@see chmod()
1.351 +@see stat()
1.352 +@see umask()
1.353 +
1.354 +
1.355 +
1.356 +@capability Deferred @ref RFs::MkDir(const TDesC16&)
1.357 +
1.358 +@publishedAll
1.359 +@externallyDefinedApi
1.360 +*/
1.361 +
1.362 +
1.363 +/** @fn mkfifo(const char *pathname, mode_t mode)
1.364 +@param pathname
1.365 +@param mode
1.366 +@return The mkfifo function returns the value 0 if successful; otherwise the
1.367 +value -1 is returned and errno is set to indicate the error.
1.368 +
1.369 + The mkfifo system call
1.370 +creates a new FIFO(First In First Out) file with name path. The access permissions are
1.371 +specified by mode and restricted by the umask of the calling process.
1.372 +With the current implementation, the use of umask has no effect.
1.373 +
1.374 + The FIFO's owner ID and group ID are set to root.
1.375 +
1.376 + Please note that running stat on a FIFO file does not provide modification
1.377 + time information (it provides the creation time). Use fstat on the fd to retrieve the last modified
1.378 + time.
1.379 +
1.380 +Examples:
1.381 +@code
1.382 +#include <sys/types.h>
1.383 +#include <sys/stat.h>
1.384 +#include <stdio.h>
1.385 +
1.386 +int main(void)
1.387 +{
1.388 + char *pathname = "C:\XXX";
1.389 + mode_t mode = 0666;
1.390 + if (mkfifo(pathname, mode) == -1) {
1.391 + printf("mkfifo() failed");
1.392 + }
1.393 + return 0;
1.394 +}
1.395 +
1.396 +@endcode
1.397 +@see chmod()
1.398 +@see stat()
1.399 +@see umask()
1.400 +
1.401 +Limitations:
1.402 +
1.403 +KErrNotReady of Symbian error code is mapped to ENOENT, which typically means drive
1.404 +not found or filesystem not mounted on the drive.
1.405 +
1.406 +@capability Deferred @ref RFs::Delete(const TDesC16&)
1.407 +
1.408 +@publishedAll
1.409 +@externallyDefinedApi
1.410 +*/
1.411 +
1.412 +/** @fn stat(const char *name, struct stat *st)
1.413 +@param name
1.414 +@param st
1.415 +
1.416 +Note: This description also covers the following functions -
1.417 + lstat() fstat() __xstat() __lxstat()
1.418 +
1.419 +@return Upon successful completion, the value 0 is returned; otherwise the
1.420 +value -1 is returned and the global variable errno is set to indicate the error.
1.421 +
1.422 +@code
1.423 + st_dev The numeric ID of the device containing the file.
1.424 + st_ino The file's inode number.
1.425 + st_nlink
1.426 + The number of hard links to the file.
1.427 +
1.428 +@endcode
1.429 +@code
1.430 + st_atime Time when file data last accessed.
1.431 + Changed by the .Xr utimes 2, read and readv system calls.
1.432 + st_mtime Time when file data last modified.
1.433 + Changed by the mkdir, mkfifo, mknod, utimes, write and writev system calls.
1.434 + st_ctime Time when file status was last changed (inode data modification).
1.435 + Changed by the chmod, chown, creat, link, mkdir, mkfifo, mknod, rename, rmdir, symlink, truncate, unlink, utimes, write and writev system calls.
1.436 + st_birthtime
1.437 + Time when the inode was created.
1.438 +
1.439 +@endcode
1.440 +@code
1.441 + st_size The file size in bytes.
1.442 + st_blksize
1.443 + The optimal I/O block size for the file.
1.444 + st_blocks The actual number of blocks allocated for the file in 512-byte units.
1.445 + As short symbolic links are stored in the inode, this number may
1.446 + be zero.
1.447 +
1.448 +@endcode
1.449 +@code
1.450 + st_uid The user ID of the file's owner.
1.451 + st_gid The group ID of the file.
1.452 + st_mode
1.453 + Status of the file (see below).
1.454 +
1.455 +@endcode
1.456 +@code
1.457 + Test for a block special file.
1.458 + Test for a character special file.
1.459 + Test for a directory.
1.460 + Test for a pipe or FIFO special file.
1.461 + Test for a symbolic link. NOTE: Inode structure is not supported by Symbian OS and hence link count updation is not possible.
1.462 + Check for symbolic link would always fail because of this reason.
1.463 + Test for a regular file.
1.464 + Test for a socket.
1.465 + Test for a whiteout.
1.466 +
1.467 +@endcode
1.468 + The stat system call obtains information about the file pointed to by path. Read, write or execute
1.469 +permission of the named file is not required, but all directories
1.470 +listed in the path name leading to the file must be searchable.
1.471 +
1.472 + The lstat system call is like stat except in the case where the named file is a symbolic link,
1.473 +in which case lstat returns information about the link,
1.474 +while stat returns information about the file the link references.
1.475 +
1.476 + The fstat system call obtains the same information about an open file
1.477 +known by the file descriptor fd.
1.478 +
1.479 + The __xstat and __lxstat system calls are exactly similar to stat and lstat functionality.
1.480 +
1.481 + The sb argument is a pointer to a stat structure as defined by \#include \<sys/stat.h\> and into which information is
1.482 + placed concerning the file.
1.483 +
1.484 + The fields of struct stat
1.485 +related to the file system are as follows:
1.486 +
1.487 +@code
1.488 +
1.489 +st_dev The numeric ID of the device containing the file.
1.490 +st_ino The file's inode number.
1.491 +st_nlink The number of hard links to the file.
1.492 +
1.493 +@endcode
1.494 +
1.495 + The st_dev and st_ino fields together identify the file uniquely within the system.
1.496 +
1.497 + The time-related fields of struct stat
1.498 +are as follows:
1.499 +
1.500 +st_atime Time when file data last accessed.
1.501 +Changed by the .Xr utimes 2, read and readv system calls.
1.502 +st_mtime Time when file data last modified.
1.503 +Changed by the mkdir, mkfifo, mknod, utimes, write and writev system calls.
1.504 +st_ctime Time when file status was last changed (inode data modification).
1.505 +Changed by the chmod, chown, creat, link, mkdir, mkfifo, mknod, rename, rmdir, symlink, truncate, unlink, utimes, write and writev system calls. st_birthtime Time when the inode was created.
1.506 +
1.507 + If _POSIX_SOURCE is not defined, the time-related fields are defined as:
1.508 +
1.509 +@code
1.510 +#ifndef _POSIX_SOURCE
1.511 +#define st_atime st_atimespec.tv_sec
1.512 +#define st_mtime st_mtimespec.tv_sec
1.513 +#define st_ctime st_ctimespec.tv_sec
1.514 +#endif
1.515 +@endcode
1.516 +
1.517 + The size-related fields of the struct stat
1.518 +are as follows:
1.519 +st_size The file size in bytes.
1.520 +st_blksize The optimal I/O block size for the file. st_blocks The actual number of blocks allocated for the file in 512-byte units.
1.521 +
1.522 +As short symbolic links are stored in the inode, this number may
1.523 +be zero.
1.524 +
1.525 + The access-related fields of struct stat
1.526 +are as follows:
1.527 +st_uid The user ID of the file's owner.
1.528 +st_gid The group ID of the file.
1.529 +st_mode Status of the file (see below).
1.530 +
1.531 + The status information word st_mode has the following bits:
1.532 +@code
1.533 +#define S_IFMT 0170000 // type of file
1.534 +#define S_IFIFO 0010000 // named pipe (fifo)
1.535 +#define S_IFCHR 0020000 // character special
1.536 +#define S_IFDIR 0040000 // directory
1.537 +#define S_IFBLK 0060000 // block special
1.538 +#define S_IFREG 0100000 // regular
1.539 +#define S_IFLNK 0120000 // symbolic link
1.540 +#define S_IFSOCK 0140000 // socket
1.541 +#define S_IFWHT 0160000 // whiteout
1.542 +#define S_ISUID 0004000 // set user id on execution
1.543 +#define S_ISGID 0002000 // set group id on execution
1.544 +#define S_ISVTX 0001000 // save swapped text even after use
1.545 +#define S_IRUSR 0000400 // read permission, owner
1.546 +#define S_IWUSR 0000200 // write permission, owner
1.547 +#define S_IXUSR 0000100 // execute/search permission, owner
1.548 +@endcode
1.549 +
1.550 +
1.551 + For a list of access modes, see \#include \<sys/stat.h\> access and chmod The following macros are available to
1.552 + test whether a st_mode value passed in the m argument corresponds to a file of the specified type: S_ISBLK (m); Test for a block special file. S_ISCHR (m); Test for a character special file. S_ISDIR (m); Test for a directory. S_ISFIFO (m); Test for a pipe or FIFO special file. S_ISLNK (m); Test for a symbolic link. NOTE: Inode structure is not supported by Symbian OS and hence link count updation is not possible.
1.553 +Check for symbolic link would always fail because of this reason. S_ISREG (m); Test for a regular file. S_ISSOCK (m); Test for a socket. S_ISWHT (m); Test for a whiteout.
1.554 +
1.555 + The macros evaluate to a non-zero value if the test is true
1.556 +or to the value 0 if the test is false.
1.557 +
1.558 + Note: To obtain correct timestamps of FIFOs use fstat instead of stat call.
1.559 +
1.560 +Examples:
1.561 +@code
1.562 +/* Detailed description: Sample usage of stat system call
1.563 + * Preconditions: Example.txt file should be present in working directory
1.564 + */
1.565 +#include <fcntl.h>
1.566 +#include <unistd.h>
1.567 +#include <sys/types.h>
1.568 +#include <sys/stat.h>
1.569 +int main()
1.570 +{
1.571 + struct stat buf;
1.572 + if(stat("Example.txt" , &buf;) < 0 )
1.573 + {
1.574 + printf("Failed to stat Example.txt");
1.575 + return -1;
1.576 + }
1.577 + printf("Stat system call succeeded");
1.578 + return 0;
1.579 + }
1.580 +/*
1.581 + * Detailed description: Sample usage of fstat system call
1.582 + *
1.583 + */
1.584 +#include <fcntl.h>
1.585 +#include <unistd.h>
1.586 +#include <sys/types.h>
1.587 +#include <sys/stat.h>
1.588 +int main()
1.589 +{
1.590 + struct stat buf;
1.591 + int fd = open("Example.txt" , O_RDONLY | O_CREAT , 0666);
1.592 + if(fstat(fd , &buf;) < 0 )
1.593 + {
1.594 + printf("Failed to stat Example.txt");
1.595 + return -1;
1.596 + }
1.597 + printf("Stat system call succeeded");
1.598 + close(fd);
1.599 + return 0;
1.600 + }
1.601 +
1.602 +@endcode
1.603 + Output
1.604 +@code
1.605 +Stat system call succeeded
1.606 +
1.607 +@endcode
1.608 + Output
1.609 +@code
1.610 +Stat system call succeeded
1.611 +
1.612 +@endcode
1.613 +
1.614 +Limitations:
1.615 +
1.616 +The path parameters of the stat() and lstat() functions should not exceed 256 characters each in length.
1.617 +
1.618 +KErrNotReady of Symbian error code is mapped to ENOENT, which typically means drive
1.619 +not found or filesystem not mounted on the drive.
1.620 +
1.621 +@see access()
1.622 +@see chmod()
1.623 +@see chown()
1.624 +@see utimes()
1.625 +@see symlink()
1.626 +
1.627 +
1.628 +
1.629 +@capability Deferred @ref RFs::Entry(const TDesC16&, TEntry&)
1.630 +
1.631 +@publishedAll
1.632 +@externallyDefinedApi
1.633 +*/
1.634 +
1.635 +/** @fn stat64(const char *name, struct stat64 *st)
1.636 +@param name
1.637 +@param st
1.638 +@return Upon successful completion, the value 0 is returned; otherwise the
1.639 +value -1 is returned and the global variable errno is set to indicate the error.
1.640 +
1.641 +For full documentation see: http://www.unix.org/version2/whatsnew/lfs20mar.html#3.0
1.642 +
1.643 +@see stat()
1.644 +
1.645 +@publishedAll
1.646 +@externallyDefinedApi
1.647 +*/
1.648 +
1.649 +/** @fn umask(mode_t cmask)
1.650 +@param cmask
1.651 +@return This function always returns MASK_RWUSR.
1.652 +
1.653 + This function is build supported but not available functionally. Symbian
1.654 +OS does not support multiple users and groups
1.655 +
1.656 +
1.657 +
1.658 +
1.659 +
1.660 +@publishedAll
1.661 +@externallyDefinedApi
1.662 +*/
1.663 +
1.664 +
1.665 +/** @struct stat
1.666 +
1.667 +This structure provides detailed information about a file. The information returned depends on the type of file and/or the file system on which the file resides.
1.668 +Includes following members,
1.669 +
1.670 +@publishedAll
1.671 +@externallyDefinedApi
1.672 +*/
1.673 +
1.674 +/** @var stat::st_dev
1.675 +inode's device
1.676 +*/
1.677 +
1.678 +/** @var stat::st_ino
1.679 +inode's number
1.680 +*/
1.681 +
1.682 +/** @var stat::st_mode
1.683 +inode protection mode
1.684 +*/
1.685 +
1.686 +/** @var stat::st_nlink
1.687 +number of hard links
1.688 +*/
1.689 +
1.690 +/** @var stat::st_uid
1.691 +user ID of the file's owner
1.692 +*/
1.693 +
1.694 +/** @var stat::st_gid
1.695 +group ID of the file's group
1.696 +*/
1.697 +
1.698 +/** @var stat::st_rdev
1.699 +device type
1.700 +*/
1.701 +
1.702 +/** @var stat::st_atimespec
1.703 +time of last access
1.704 +*/
1.705 +
1.706 +/** @var stat::st_mtimespec
1.707 +time of last data modification
1.708 +*/
1.709 +
1.710 +/** @var stat::st_ctimespec
1.711 +time of last file status change
1.712 +*/
1.713 +
1.714 +/** @var stat::st_size
1.715 +file size, in bytes
1.716 +*/
1.717 +
1.718 +/** @var stat::st_blocks
1.719 +blocks allocated for file
1.720 +*/
1.721 +
1.722 +/** @var stat::st_blksize
1.723 +optimal blocksize for IO
1.724 +*/
1.725 +
1.726 +/** @var stat::st_flags
1.727 +user defined flags for file
1.728 +*/
1.729 +
1.730 +/** @var stat::st_gen
1.731 +file generation number
1.732 +*/
1.733 +
1.734 +/** @struct stat64
1.735 +
1.736 +The stat64 structure is similar to the stat structure, except that it is capable of returning information about files that are larger than 2 gigabytes.
1.737 +This structure provides detailed information about a file. The information returned depends on the type of file and/or the file system on which the file resides.
1.738 +Includes following members,
1.739 +
1.740 +@publishedAll
1.741 +@externallyDefinedApi
1.742 +*/
1.743 +
1.744 +/** @var stat64::st_dev
1.745 +inode's device
1.746 +*/
1.747 +
1.748 +/** @var stat64::st_ino
1.749 +inode's number
1.750 +*/
1.751 +
1.752 +/** @var stat64::st_mode
1.753 +inode protection mode
1.754 +*/
1.755 +
1.756 +/** @var stat64::st_nlink
1.757 +number of hard links
1.758 +*/
1.759 +
1.760 +/** @var stat64::st_uid
1.761 +user ID of the file's owner
1.762 +*/
1.763 +
1.764 +/** @var stat64::st_gid
1.765 +group ID of the file's group
1.766 +*/
1.767 +
1.768 +/** @var stat64::st_rdev
1.769 +device type
1.770 +*/
1.771 +
1.772 +/** @var stat64::st_atimespec
1.773 +time of last access
1.774 +*/
1.775 +
1.776 +/** @var stat64::st_mtimespec
1.777 +time of last data modification
1.778 +*/
1.779 +
1.780 +/** @var stat64::st_ctimespec
1.781 +time of last file status change
1.782 +*/
1.783 +
1.784 +/** @var stat64::st_size
1.785 +file size, in bytes
1.786 +*/
1.787 +
1.788 +/** @var stat64::st_blocks
1.789 +blocks allocated for file
1.790 +*/
1.791 +
1.792 +/** @var stat64::st_blksize
1.793 +optimal blocksize for IO
1.794 +*/
1.795 +
1.796 +/** @var stat64::st_flags
1.797 +user defined flags for file
1.798 +*/
1.799 +
1.800 +/** @var stat64::st_gen
1.801 +file generation number
1.802 +*/
1.803 +
1.804 +
1.805 +/** @def S_IRWXU
1.806 +
1.807 +RWX mask for owner
1.808 +
1.809 +@publishedAll
1.810 +@externallyDefinedApi
1.811 +*/
1.812 +
1.813 +/** @def S_IRUSR
1.814 +
1.815 +R for owner
1.816 +
1.817 +@publishedAll
1.818 +@externallyDefinedApi
1.819 +*/
1.820 +
1.821 +/** @def S_IWUSR
1.822 +
1.823 +W for owner
1.824 +
1.825 +@publishedAll
1.826 +@externallyDefinedApi
1.827 +*/
1.828 +
1.829 +/** @def S_IXUSR
1.830 +
1.831 +X for owner
1.832 +
1.833 +@publishedAll
1.834 +@externallyDefinedApi
1.835 +*/
1.836 +
1.837 +
1.838 +/** @def S_IFMT
1.839 +
1.840 +type of file mask
1.841 +
1.842 +@publishedAll
1.843 +@externallyDefinedApi
1.844 +*/
1.845 +
1.846 +/** @def S_IFIFO
1.847 +
1.848 +named pipe (fifo)
1.849 +
1.850 +@publishedAll
1.851 +@externallyDefinedApi
1.852 +*/
1.853 +
1.854 +/** @def S_IFCHR
1.855 +
1.856 +character special
1.857 +
1.858 +@publishedAll
1.859 +@externallyDefinedApi
1.860 +*/
1.861 +
1.862 +/** @def S_IFDIR
1.863 +
1.864 +directory
1.865 +
1.866 +@publishedAll
1.867 +@externallyDefinedApi
1.868 +*/
1.869 +
1.870 +/** @def S_IFBLK
1.871 +
1.872 +block special
1.873 +
1.874 +@publishedAll
1.875 +@externallyDefinedApi
1.876 +*/
1.877 +
1.878 +/** @def S_IFREG
1.879 +
1.880 +regular
1.881 +
1.882 +@publishedAll
1.883 +@externallyDefinedApi
1.884 +*/
1.885 +
1.886 +/** @def S_IFLNK
1.887 +
1.888 +symbolic link
1.889 +
1.890 +@publishedAll
1.891 +@externallyDefinedApi
1.892 +*/
1.893 +
1.894 +/** @def S_ISDIR(m)
1.895 +
1.896 +directory.
1.897 +
1.898 +@publishedAll
1.899 +@externallyDefinedApi
1.900 +*/
1.901 +
1.902 +/** @def S_ISCHR(m)
1.903 +
1.904 +char special.
1.905 +
1.906 +@publishedAll
1.907 +@externallyDefinedApi
1.908 +*/
1.909 +
1.910 +/** @def S_ISLNK(m)
1.911 +
1.912 +symbolic link
1.913 +
1.914 +@publishedAll
1.915 +@externallyDefinedApi
1.916 +*/
1.917 +
1.918 +/** @def S_ISBLK(m)
1.919 +
1.920 +block special
1.921 +
1.922 +@publishedAll
1.923 +@externallyDefinedApi
1.924 +*/
1.925 +
1.926 +/** @def S_ISREG(m)
1.927 +
1.928 +regular file
1.929 +
1.930 +@publishedAll
1.931 +@externallyDefinedApi
1.932 +*/
1.933 +
1.934 +/** @def S_ISFIFO(m)
1.935 +
1.936 +fifo or socket
1.937 +
1.938 +@publishedAll
1.939 +@externallyDefinedApi
1.940 +*/
1.941 +
1.942 +/** @def S_ISUID
1.943 +
1.944 +set user id on execution
1.945 +
1.946 +@publishedAll
1.947 +@externallyDefinedApi
1.948 +*/
1.949 +
1.950 +/** @def S_ISGID
1.951 +
1.952 +set group id on execution
1.953 +
1.954 +@publishedAll
1.955 +@externallyDefinedApi
1.956 +*/
1.957 +
1.958 +/** @def S_IRWXG
1.959 +
1.960 +RWX mask for group
1.961 +
1.962 +@publishedAll
1.963 +@externallyDefinedApi
1.964 +*/
1.965 +
1.966 +/** @def S_IRGRP
1.967 +
1.968 +R for group
1.969 +
1.970 +@publishedAll
1.971 +@externallyDefinedApi
1.972 +*/
1.973 +
1.974 +
1.975 +/** @def S_IWGRP
1.976 +
1.977 +W for group
1.978 +
1.979 +@publishedAll
1.980 +@externallyDefinedApi
1.981 +*/
1.982 +
1.983 +
1.984 +/** @def S_IXGRP
1.985 +
1.986 +X for group
1.987 +
1.988 +@publishedAll
1.989 +@externallyDefinedApi
1.990 +*/
1.991 +
1.992 +/** @def S_IRWXO
1.993 +
1.994 +RWX mask for other
1.995 +
1.996 +@publishedAll
1.997 +@externallyDefinedApi
1.998 +*/
1.999 +
1.1000 +
1.1001 +/** @def S_IROTH
1.1002 +
1.1003 +R for other
1.1004 +
1.1005 +@publishedAll
1.1006 +@externallyDefinedApi
1.1007 +*/
1.1008 +
1.1009 +
1.1010 +/** @def S_IWOTH
1.1011 +
1.1012 +W for other
1.1013 +
1.1014 +@publishedAll
1.1015 +@externallyDefinedApi
1.1016 +*/
1.1017 +
1.1018 +
1.1019 +/** @def S_IXOTH
1.1020 +
1.1021 +X for other
1.1022 +
1.1023 +@publishedAll
1.1024 +@externallyDefinedApi
1.1025 +*/
1.1026 +
1.1027 +/** @def S_ISVTX
1.1028 +
1.1029 +save swapped text even after use
1.1030 +
1.1031 +@publishedAll
1.1032 +@externallyDefinedApi
1.1033 +*/
1.1034 +
1.1035 +
1.1036 +
1.1037 +