c++ - copyfile function on Mac OS X -
i working on program copies files , folders point point b, it's pretty simple part. decided use copyfile function actual copying because handles of metadata. whatever reason there many files can't copy, if i'm running root. example file can't copied /usr/share/emacs/22.1/etc/babyl
i don't know why this. file good, can go in finder , copy , paste other ordinary file. there permission issue missing? seems system files, not of them. consistent in , not copy.
the actual function call looks copyfile(filepath, destpath, gstate, copyfile_data | copyfile_acl | copyfile_stat | copyfile_xattr);
error i'm getting not useful, io error 5.
is there missing causes not work files? or copyfile not certian things? there better ways copyfile copy files , of attributes/metadata?
please don't suggest other programs copy files, that's not i'm here for. thanks!
you going have dig deeper find problem, fortunately can dig inside copyfile()
itself. apple provides full source can link code , trace through find problem.
note: may have tweak source little compile, straightforward enough so. if try , stuck ask question details of you've tried , what's gone wrong, you.
hth
Comments
Post a Comment