Changeset 21616 in vbox for trunk/include
- Timestamp:
- Jul 15, 2009 3:27:07 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 50137
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/file.h
r21582 r21616 58 58 * @{ */ 59 59 /** Open the file with read access. */ 60 #define RTFILE_O_READ 0x0000000160 #define RTFILE_O_READ 0x00000001 61 61 /** Open the file with write access. */ 62 #define RTFILE_O_WRITE 0x0000000262 #define RTFILE_O_WRITE 0x00000002 63 63 /** Open the file with read & write access. */ 64 #define RTFILE_O_READWRITE 0x0000000364 #define RTFILE_O_READWRITE 0x00000003 65 65 /** The file access mask. 66 * @remark The value 0 is invalid. */67 #define RTFILE_O_ACCESS_MASK 0x0000000366 * @remarks The value 0 is invalid. */ 67 #define RTFILE_O_ACCESS_MASK 0x00000003 68 68 69 69 /** Open file in APPEND mode, so all writes to the file handle will 70 70 * append data at the end of the file. 71 * @remark It is ignored if write access is not requested, that is RTFILE_O_WRITE is not set. 72 */ 73 #define RTFILE_O_APPEND 0x00000004 71 * @remarks It is ignored if write access is not requested, that is 72 * RTFILE_O_WRITE is not set. */ 73 #define RTFILE_O_APPEND 0x00000004 74 /* 0x00000008 is unused atm. */ 74 75 75 76 /** Sharing mode: deny none (the default mode). */ 76 #define RTFILE_O_DENY_NONE 0x0000000077 #define RTFILE_O_DENY_NONE 0x00000000 77 78 /** Sharing mode: deny read. */ 78 #define RTFILE_O_DENY_READ 0x0000001079 #define RTFILE_O_DENY_READ 0x00000010 79 80 /** Sharing mode: deny write. */ 80 #define RTFILE_O_DENY_WRITE 0x0000002081 #define RTFILE_O_DENY_WRITE 0x00000020 81 82 /** Sharing mode: deny read and write. */ 82 #define RTFILE_O_DENY_READWRITE 0x0000003083 #define RTFILE_O_DENY_READWRITE 0x00000030 83 84 /** Sharing mode: deny all. */ 84 #define RTFILE_O_DENY_ALL RTFILE_O_DENY_READWRITE85 #define RTFILE_O_DENY_ALL RTFILE_O_DENY_READWRITE 85 86 /** Sharing mode: do NOT deny delete (NT). 86 * @remark This might not be implemented on all platforms,87 * and will bedefaulted & ignored on those.88 */ 89 #define RTFILE_O_DENY_NOT_DELETE 0x0000004087 * @remarks This might not be implemented on all platforms, and will be 88 * defaulted & ignored on those. 89 */ 90 #define RTFILE_O_DENY_NOT_DELETE 0x00000040 90 91 /** Sharing mode mask. */ 91 #define RTFILE_O_DENY_MASK 0x0000007092 #define RTFILE_O_DENY_MASK 0x00000070 92 93 93 94 /** Action: Open an existing file (the default action). */ 94 #define RTFILE_O_OPEN 0x0000000095 #define RTFILE_O_OPEN 0x00000000 95 96 /** Action: Create a new file or open an existing one. */ 96 #define RTFILE_O_OPEN_CREATE 0x0000010097 #define RTFILE_O_OPEN_CREATE 0x00000100 97 98 /** Action: Create a new a file. */ 98 #define RTFILE_O_CREATE 0x0000020099 #define RTFILE_O_CREATE 0x00000200 99 100 /** Action: Create a new file or replace an existing one. */ 100 #define RTFILE_O_CREATE_REPLACE 0x00000300101 #define RTFILE_O_CREATE_REPLACE 0x00000300 101 102 /** Action mask. */ 102 #define RTFILE_O_ACTION_MASK 0x00000300 103 103 #define RTFILE_O_ACTION_MASK 0x00000300 104 105 /*0x00000400 106 and 0x00000800 are unused atm. */ 104 107 /** Turns off indexing of files on Windows hosts, *CREATE* only. 105 * @remark This might not be implemented on all platforms, 106 * and will be ignored on those. 107 */ 108 #define RTFILE_O_NOT_CONTENT_INDEXED 0x00000800 108 * @remarks Window only. */ 109 #define RTFILE_O_NOT_CONTENT_INDEXED 0x00000800 109 110 /** Truncate the file. 110 * @remark 111 * @remark The trunction doesn't have to be atomically, so anyone112 * else opening the file may be racing us. The caller is113 * responsible for not causingthis race. */114 #define RTFILE_O_TRUNCATE 0x00001000111 * @remarks This will not truncate files opened for read-only. 112 * @remarks The trunction doesn't have to be atomically, so anyone else opening 113 * the file may be racing us. The caller is responsible for not causing 114 * this race. */ 115 #define RTFILE_O_TRUNCATE 0x00001000 115 116 /** Make the handle inheritable on RTProcessCreate(/exec). */ 116 #define RTFILE_O_INHERIT 0x00002000117 #define RTFILE_O_INHERIT 0x00002000 117 118 /** Open file in non-blocking mode - non-portable. 118 * @remark This flag may not be supported on all platforms, in which 119 * case it's considered an invalid parameter. 120 */ 121 #define RTFILE_O_NON_BLOCK 0x00004000 119 * @remarks This flag may not be supported on all platforms, in which case it's 120 * considered an invalid parameter. */ 121 #define RTFILE_O_NON_BLOCK 0x00004000 122 122 /** Write through directly to disk. Workaround to avoid iSCSI 123 123 * initiator deadlocks on Windows hosts. 124 * @remark This might not be implemented on all platforms, 125 * and will be ignored on those. 126 */ 127 #define RTFILE_O_WRITE_THROUGH 0x00008000 128 129 /** File attributes access, *CREATE* only. 130 * @remark This might not be implemented on all platforms, 131 * and will be ignored on those. 132 */ 133 /** Attributes can be read if the file is being opened 134 * with read access, and can be written with write access. 135 */ 136 #define RTFILE_O_ACCESS_ATTR_DEFAULT 0x00000000 137 /** Attributes can be read. */ 138 #define RTFILE_O_ACCESS_ATTR_READ 0x00010000 139 /** Attributes can be written. */ 140 #define RTFILE_O_ACCESS_ATTR_WRITE 0x00020000 141 /** Attributes can be both read & written. */ 142 #define RTFILE_O_ACCESS_ATTR_READWRITE 0x00030000 143 /** The file attributes access mask. */ 144 #define RTFILE_O_ACCESS_ATTR_MASK 0x00030000 124 * @remarks This might not be implemented on all platforms, and will be ignored 125 * on those. */ 126 #define RTFILE_O_WRITE_THROUGH 0x00008000 127 128 /** Attribute access: Attributes can be read if the file is being opened with 129 * read access, and can be written with write access. */ 130 #define RTFILE_O_ACCESS_ATTR_DEFAULT 0x00000000 131 /** Attribute access: Attributes can be read. 132 * @remarks Windows only. */ 133 #define RTFILE_O_ACCESS_ATTR_READ 0x00010000 134 /** Attribute access: Attributes can be written. 135 * @remarks Windows only. */ 136 #define RTFILE_O_ACCESS_ATTR_WRITE 0x00020000 137 /** Attribute access: Attributes can be both read & written. 138 * @remarks Windows only. */ 139 #define RTFILE_O_ACCESS_ATTR_READWRITE 0x00030000 140 /** Attribute access: The file attributes access mask. 141 * @remarks Windows only. */ 142 #define RTFILE_O_ACCESS_ATTR_MASK 0x00030000 145 143 146 144 /** Open file for async I/O 147 * @remark This flag may not be needed on all platforms, 148 * and will be ignored on those. 149 */ 150 #define RTFILE_O_ASYNC_IO 0x00040000 151 152 /** Unix file mode mask for use when creating files. */ 153 #define RTFILE_O_CREATE_MODE_MASK 0x1ff00000 154 /** The number of bits to shift to get the file mode mask. 155 * To extract it: (fFlags & RTFILE_O_CREATE_MODE_MASK) >> RTFILE_O_CREATE_MODE_SHIFT. 156 */ 157 #define RTFILE_O_CREATE_MODE_SHIFT 20 145 * @remarks This flag may not be needed on all platforms, and will be ignored on 146 * those. */ 147 #define RTFILE_O_ASYNC_IO 0x00040000 148 158 149 /** Disables caching. 159 150 * … … 175 166 * and will be ignored on those. 176 167 */ 177 #define RTFILE_O_NO_CACHE 0x00080000 168 #define RTFILE_O_NO_CACHE 0x00080000 169 170 /** Unix file mode mask for use when creating files. */ 171 #define RTFILE_O_CREATE_MODE_MASK 0x1ff00000 172 /** The number of bits to shift to get the file mode mask. 173 * To extract it: (fFlags & RTFILE_O_CREATE_MODE_MASK) >> RTFILE_O_CREATE_MODE_SHIFT. 174 */ 175 #define RTFILE_O_CREATE_MODE_SHIFT 20 176 177 /*0x20000000, 178 0x40000000 179 and 0x80000000 are unused atm. */ 178 180 179 181 /** Mask of all valid flags. 180 182 * @remark This doesn't validate the access mode properly. 181 183 */ 182 #define RTFILE_O_VALID_MASK 0x1ffFFB77184 #define RTFILE_O_VALID_MASK 0x1ffFFB77 183 185 184 186 /** @} */
Note:
See TracChangeset
for help on using the changeset viewer.