Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
is there a copyToArea?
Bowker
Okay I give up - I can't find it....
TS 6.5
CSSDK 2.5
Where can I find the method copyToArea()? I'm assuming there is one somewhere.
Dan Bowker
Northern Trust
Web Publishing Technology
Find more posts tagged with
Comments
gzevin
com.interwoven.cssdk.filesys
CSWorkarea
method: update
from the docs:
CSAreaRelativePath[] csAreaRelPath = new CSAreaRelativePath(1);
csAreaRelPath[0] = new CSAreaRelativePath("file1.txt");
CSUpdateResult res =
wa.update(csAreaRelPath, branch.getStaging(), OVERWRITE_ALL);
Greg Zevin, Ph.D. Comp. Sc.
Independent Interwoven Consultant/Architect
Sydney, AU
PaulW
if you want to copy to a different folder in another workarea it is easier to just to do a java file copy. That workarea update will only copy it to the same folder in a different workarea.
Edited by PaulW on 05/06/05 10:52 PM (server time).
gzevin
and how do you suggest to copy extended attributes along with a file?
Greg Zevin, Ph.D. Comp. Sc.
Independent Interwoven Consultant/Architect
Sydney, AU
Bill Klish
You can just use the CSSDK CSExtendedAttibute objects from a CSSimplefile object.
PaulW
To get the extended attributes do something like:
//get file EAs so we can set them on target later.
CSSimpleFile csfSource=(CSSimpleFile)currentFile;
CSExtendedAttribute[] csea = csfSource.getExtendedAttributes(null);
To set the extended attribs on the target file, do something like:
CSFile targetFile = client.getFile(destVPath);
CSSimpleFile csfTarget=(CSSimpleFile)targetFile;
csfTarget.setExtendedAttributes(csea);
gzevin
I am not that interested in the examples, but thanks.
what I said is that a 'simple java file copy' will not copy the EAs, and, as such, is not suitable as an alternative to iwupdate, etc.
Greg Zevin, Ph.D. Comp. Sc.
Independent Interwoven Consultant/Architect
Sydney, AU
PaulW
I'm pretty sure you asked "...how do you suggest to copy extended attributes along with a file?"
Thus the examples were given to show how.
gzevin
I asked rethorically, just to show that what is suggested is a workaround, rather than a clean copy using a native method. We do use similar workarounds, in perl, etc, but I would not bother with capturing EAs, when one has one command that does it all.
Greg Zevin, Ph.D. Comp. Sc.
Independent Interwoven Consultant/Architect
Sydney, AU
PaulW
If everyone assumed every question asked whas rehtorical, none would ever get answered. Would they?
gzevin
Ok, treat this as a sheer misunderstanding.
Greg Zevin, Ph.D. Comp. Sc.
Independent Interwoven Consultant/Architect
Sydney, AU