CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: copy and unlink

  1. #1
    Join Date
    Jul 2007
    Posts
    249

    Red face copy and unlink

    i have one doubt is it good to move the file from one path to other path.
    Or it is good to copy the file and unlink.

  2. #2
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: copy and unlink

    Move is more efficient, but it won't work across drives.

  3. #3
    Join Date
    Jul 2007
    Posts
    249

    Re: copy and unlink

    across drives mean?

    in linux i saw a code where i see copy and unlink to /mnt/mypath instead move

    thats why the doubt

  4. #4
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    4,626

    Re: copy and unlink

    there is a very distinct difference.

    Moving a file typically means that you will also move the access rights associated with the file into it's new location.
    This could be what you want, but it could NOT be.

    the copy/delete approach creates a new file, the new file inherits the rights from the folder it's being created in.

    this assumes you're using 'normal' behaviour, you can also give the file specific access rights as part of the move.

  5. #5
    Join Date
    Jul 2007
    Posts
    249

    Re: copy and unlink

    Thanks all. I got it now

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured