Hi All!. I have a problem, I want to get the modified date of all the files in a directory. can anyone tell what is wrong with it? Here is my java service:
// pipeline
IDataCursor pipelineCursor = pipeline.getCursor();
String directory = IDataUtil.getString( pipelineCursor, “directory” );
pipelineCursor.destroy();
File folder = new File(“c:/”);
File listOfFiles = folder.listFiles();
for (int i = 0; i < listOfFiles.length; i++) {
long datetime=listOfFiles[i].lastModified();
Date date=new Date(datetime);
MDList=date;
}
// pipeline
IDataCursor pipelineCursor_1 = pipeline.getCursor();
String MDList = new String[1];
MDList[0] = “date”;
IDataUtil.put( pipelineCursor_1, “MDList”, MDList );
pipelineCursor_1.destroy();
directory is input and MDList is the output.
:sad: