Hi,Sorry if I made a mistake about the forum where I post my problem, and sorry for my poor english
.
ops: I want to get some informations about a file or folder, but I don't know how to do.For my example, I have a file plop.txt in the folder /app:company_homeMy function:public static Reference copyFile(String file1Path, String file2Name, String file2Folder) throws Exception{
// Get the content service
ContentServiceSoapBindingStub contentService = WebServiceFactory.getContentService();
Reference file1Ref = new Reference(STORE, null, file1Path);
Content[] readResult = contentService.read(
new Predicate(new Reference[]{file1Ref}, STORE, null),
Constants.PROP_CONTENT);
Content content = readResult[0];
//Create new content in the repository
createNewContent(file2Name, ContentUtils.getContentAsString(content),file2Folder);
return content.getNode();
}I call my function with this:copyFile("/app:company_home/plop.txt", "file copy.txt", "/app:company_home");with the address of the file in first, the name of the new file in second and to finish the path where to create the copy.So, I would like to search the file "plop.txt" to read it and copy its content into a new file.But I have a problem with the file1Ref Reference. I would like that it takes informations of the file to open it, but it does not do anything… Thanks for helping me
ops: .