How can I get changed content of modified file using RTC-SDK
When I deliver a changeset, I have get the changeset and IVersionable. Now I want to get how to get the changed content of file.
Below is source to get IVersionable :
IVersionableHandle versionableHandle = change.afterState();
|
One answer
I do the following to download a file from the repository:
FileOutputStream outputFile = new FileOutputStream(destinationFile);
IConfiguration c = iWorkspaceConnection.configuration(componentHandle);
IFileItem fileItem = (IFileItem) c.fetchCompleteItem(versionableHandle, null);
IFileContent content = fileItem.getContent();
IFileContentManager contentManager = FileSystemCore.getContentManager(iTeamRepository);
contentManager.retrieveContent(fileItem, content, outputFile, null);
Hope this help you.
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.