muyangye commented on code in PR #2430:
URL: https://github.com/apache/streampipes/pull/2430#discussion_r1479310790


##########
streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/file/FileHandler.java:
##########
@@ -39,6 +40,16 @@ public File getFile(String filename) {
     return FileUtils.getFile(makeFile(filename));
   }
 
+  public void renameFile(String oldFilename, String newFilename) {
+    try {
+      var fileInputStream = new FileInputStream(getFile(oldFilename));
+      deleteFile(oldFilename);
+      storeFile(newFilename, fileInputStream);
+    } catch (Exception e) {
+      System.out.println(e.getMessage());

Review Comment:
   Both are definitely doable, I will push my changes together with the unit 
tests.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to