Skip to content

Commit

Permalink
0002283: On Edit File Triggers the Before Copy Script and After Copy …
Browse files Browse the repository at this point in the history
…Script lose line feeds after saving them
  • Loading branch information
chenson42 committed Apr 24, 2015
1 parent 9c0570e commit e8a370f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
Expand Up @@ -33,8 +33,8 @@ Sync On Delete:: Whether to capture and send files when they are deleted.
Sync On Ctl File:: Combined with sync_on_create, determines whether to capture and send files when a matching control file exists.
The control file is a file of the same name with a '.ctl' extension appended to the end.
Delete After Sync:: Determines whether to delete the file after it has synced successfully.
Before Copy Script:: A beanshell script that is run right before the file copy.
After Copy Script:: A beanshell script that is run right after the file copy.
Before Copy Script:: A beanshell script that is run at the target node right before the file copy to it's destination directory.
After Copy Script:: A beanshell script that is run at the target node right after the file copy to it's destination directory.


ifndef::pro[]
Expand Down
Expand Up @@ -42,3 +42,15 @@ the APIs available in SymmetricDS.
sourceNodeId:: This is a bound variable that represents the nodeId that is the source of the file.

log:: This is the bound instance of an org.slf4j.Logger that can be used to log to the SymmetricDS log file.

.Example of a Before Copy Script
====
[source, JAVA]
----
File file = new File(batchDir + "/" + sourceFilePath + "/" + sourceFileName);
if (file.exists()) {
String path = file.getAbsolutePath();
cp (path,"/backup/" + sourceFileName);
}
----
====

0 comments on commit e8a370f

Please sign in to comment.