All docs This doc

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • source: The location of the file. This can be a file on the local physical file system or a file on an FTP server. 
    For local files, the URI format is [file://]absolute-path,where absolute-path is a valid absolute file name for the local platform. UNC names are supported under Windows (e.g., file:///home/user/test   or  file:///C:/Windows ). 
    For files on a FTP server, the URI format is ftp://[ username[: password]@] hostname[: port][ relative-path]  (e.g., ftp://myusername:mypassword@somehost/pub/downloads/test.txt).
  • destination: The location of the archived file with the file name. (e.g., file:///home/user/test /test.zip)
  • inputContent: The input content which needs to be archived.
  • fileName: The name of the file where input content needs to be archived.
  • setTimeout [optional]: The timeout value on the JSC(Java Secure Channel) session in milliseconds. e.g., 100000.
  • setPassiveMode [optional]: Set to true if you want to enable passive mode.
  • setSoTimeout [optional]: The socket timeout value for the FTP client. e.g., 100000.
  • setUserDirIsRoot [optional]: Set to true if you want to use root as the user directory.
  • setStrictHostKeyChecking [optional]: Sets the host key checking to use .e.g., no. 
Note
titleNote

To make archive operation, you can give either source or inputContent. If inputContent gives as the parameter, we need to specify fileName. Otherwise, it will use the default fileName(output.txt).

...

  • source: The location of the file.

  • destination: The location to write the files.

  • chunkSize: The chunk size in bytes to split the file. This is to split the file based on chunk size. You should provide either chunkSize or numberOfLines or xpathExpression to split the file.

  • numberOfLines: The number of line per file. This is to split the file based on the number of lines. You  You should provide either chunkSize or numberOfLines to or xpathExpression to split the file.
  • xpathExpression: Defines a pattern in order to select a set of nodes in xml document. You should provide either chunkSize or numberOfLines or xpathExpression to split the file.

Sample request

Following is a sample REST/JSON request that can be handled by the splitFile operation.

Code Block
languagexml
titleSample Request for splitFile based on xpath expression
{
     "source":"/home/vive/Desktop/file/outTest/sample.txt",
	 "destination":"/home/vive/Desktop/file/outTest/",
	     "chunkSizexpathExpression":"4096//products/product",
} 
Code Block
languagexml
titleSample Request for splitFile based on chunkSize
{
     "xpathExpressionsource":"/home/products/product"
vive/Desktop/file/outTest/sample.txt",
	 "destination":"/home/vive/Desktop/file/outTest/",
	 "chunkSize":"4096"
} 

Anchor
mergeFiles
mergeFiles
Merging multiple chunks into a file

...