Page History
...
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
,whereabsolute-path
is a valid absolute file name for the local platform. UNC names are supported under Windows (e.g.,file:///home/user/test
orfile:///C:/Windows
).
For files on a FTP server, the URI format isftp://[ 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 totrue
if you want to enable passive mode.setSoTimeout
[optional]: The socket timeout value for the FTP client. e.g., 100000.setUserDirIsRoot
[optional]: Set totrue
if you want to use root as the user directory.setStrictHostKeyChecking
[optional]: Sets the host key checking to use .e.g., no.
Note | ||
---|---|---|
| ||
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 | ||||
---|---|---|---|---|
| ||||
{ "source":"/home/vive/Desktop/file/outTest/sample.txt", "destination":"/home/vive/Desktop/file/outTest/", "chunkSizexpathExpression":"4096",//products/product" } |
Code Block | ||||
---|---|---|---|---|
| ||||
{ "xpathExpression"source":"/home/vive/Desktop/file/outTest/sample.txt", "destination":"//products/producthome/vive/Desktop/file/outTest/", "chunkSize":"4096" } |
Anchor | ||||
---|---|---|---|---|
|
...
Overview
Content Tools
Activity