VirtualBox

Changeset 7340 in vbox for trunk/src/VBox/Runtime/r3


Ignore:
Timestamp:
Mar 6, 2008 5:51:43 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
28758
Message:

Runtime: Added fFlags (RTFILECOPY_FLAG_NO_DENY_WRITE) to RTFileCopyEx.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/fileio.cpp

    r6992 r7340  
    313313 * @param   pszDst      The path to the destination file.
    314314 *                      This file will be created.
     315 * @param   fFlags      Flags, any of the RTFILECOPY_FLAGS_ \#defines.
    315316 * @param   pfnProgress Pointer to callback function for reporting progress.
    316317 * @param   pvUser      User argument to pass to pfnProgress along with the completion precentage.
    317318 */
    318 RTDECL(int) RTFileCopyEx(const char *pszSrc, const char *pszDst, PFNRTPROGRESS pfnProgress, void *pvUser)
     319RTDECL(int) RTFileCopyEx(const char *pszSrc, const char *pszDst, uint32_t fFlags, PFNRTPROGRESS pfnProgress, void *pvUser)
    319320{
    320321    /*
     
    331332     */
    332333    RTFILE FileSrc;
    333     int rc = RTFileOpen(&FileSrc, pszSrc, RTFILE_O_READ | RTFILE_O_DENY_WRITE | RTFILE_O_OPEN);
     334    uint32_t fSrcOpen = RTFILE_O_READ | RTFILE_O_OPEN;
     335    if (!(fFlags & RTFILECOPY_FLAG_NO_DENY_WRITE))
     336        fSrcOpen |= RTFILE_O_DENY_WRITE;
     337    int rc = RTFileOpen(&FileSrc, pszSrc, fSrcOpen);
    334338    if (RT_SUCCESS(rc))
    335339    {
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