VirtualBox

Changeset 69977 in vbox for trunk/include/iprt/file.h


Ignore:
Timestamp:
Dec 7, 2017 1:02:36 PM (7 years ago)
Author:
vboxsync
Message:

IPRT/vfs: Implemented RTVFsFileSetSize, RTVfsFileGetMaxSize and RTvfsFileQueryMaxSize.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/file.h

    r69105 r69977  
    11371137/** @} */
    11381138
    1139 /** @name RTFileSetAllocationSize flags
     1139/**
     1140 * Sets the current size of the file ensuring that all required blocks
     1141 * are allocated on the underlying medium.
     1142 *
     1143 * @returns IPRT status code.
     1144 * @retval  VERR_NOT_SUPPORTED if either this operation is not supported on the
     1145 *          current host in an efficient manner or the given combination of
     1146 *          flags is not supported.
     1147 * @param   hFile           The handle to the file.
     1148 * @param   cbSize          The new size of the file to allocate.
     1149 * @param   fFlags          Combination of RTFILE_ALLOC_SIZE_F_*
     1150 */
     1151RTDECL(int) RTFileSetAllocationSize(RTFILE hFile, uint64_t cbSize, uint32_t fFlags);
     1152
     1153/** @name RTFILE_ALLOC_SIZE_F_XXX - RTFileSetAllocationSize flags
    11401154 * @{ */
    11411155/** Default flags. */
    11421156#define RTFILE_ALLOC_SIZE_F_DEFAULT         0
    1143 /** Do not change the size of the file if the given size is
    1144  * bigger than the current file size. Useful to preallocate
    1145  * blocks beyond the current size for appending data in an efficient
    1146  * manner. Might not be supported on all hosts and will return
     1157/** Do not change the size of the file if the given size is bigger than the
     1158 * current file size.
     1159 *
     1160 * Useful to preallocate blocks beyond the current size for appending data in an
     1161 * efficient manner. Might not be supported on all hosts and will return
    11471162 * VERR_NOT_SUPPORTED in that case. */
    11481163#define RTFILE_ALLOC_SIZE_F_KEEP_SIZE       RT_BIT(0)
     
    11511166/** @} */
    11521167
    1153 /**
    1154  * Sets the current size of the file ensuring that all required blocks
    1155  * are allocated on the underlying medium.
    1156  *
    1157  * @returns IPRT status code.
    1158  * @retval  VERR_NOT_SUPPORTED if either this operation is not supported on the current host
    1159  *                             in an efficient manner or the given combination of flags is
    1160  *                             not supported.
    1161  * @param   hFile           The handle to the file.
    1162  * @param   cbSize          The new size of the file to allocate.
    1163  * @param   fFlags          Combination of RTFILE_ALLOC_SIZE_F_*
    1164  */
    1165 RTDECL(int) RTFileSetAllocationSize(RTFILE hFile, uint64_t cbSize, uint32_t fFlags);
    11661168
    11671169#ifdef IN_RING3
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette