So I am uploading all files from a dir into S3 using TransferManager
and I am able to upload also .
But my issue in the same dir file are getting written also.
So how do i call that method to write into S3 .
Do i have to call that method on fixed interval ?
Please suggest what could be the best way to call that method.
public void uploadDir(Path strFile,String strFileName){
ArrayList<File> files = new ArrayList<File>();
for (Path path : strFile) {
files.add(new File(path.toString()));
}
TransferManager xfer_mgr = TransferManagerBuilder.standard().build();
try {
MultipleFileUpload xfer = xfer_mgr.uploadFileList(bucketName,strFileName, new File("."), files);
//XferMgrProgress.showTransferProgress(xfer);
//XferMgrProgress.waitForCompletion(xfer);
} catch (AmazonServiceException e) {
System.err.println(e.getErrorMessage());
System.exit(1);
}
}