Table 1. Command line arguments
Argument Description


Command line arguments passed to app


List of directories to create


App to execute


Where to write stderr


Set stdin


Input file(s)


Swift job directory


Ouput file(s)


Where to write stdout


Swift scratch directory


Sitedir keep, true/false


Provider or files


URL Prefix


Wrapper log always transfer, true/false

Setting Description


If set to true, enable wrapper staging. Defaults to false.


Swift passes a URL prefix to swiftwrap.wrapperstaging that determines how to access local files. This setting determines what the prefix is (for example, file://).


Below is a list of protocols supported by _swiftwrap.wrapperstaging and a brief explanation of how they are implemented.


The direct protocol allows you to bypass file staging to the swift created work directory. Instead of making a copy of the file, a symlink will be created which points to the original location of the file.

file data <"direct:///home/davidkelly999/staging/absolute/direct/data.txt">;


By default, files that use the file:// URI, or files that specify no URI at all, will act in a way that is similar to the behavior or direct://. A symlink will be created in the Swift work directory that points to the original location of the file.

file data <"file:///home/davidkelly999/staging/absolute/file/data.txt">;
file data2 <"/home/davidkelly999/staging/absolute/normal/data.txt">;


GSIFTP files will be transferred using the globus-url-copy command.


HTTP is implemented in _swiftwrap.wrapperstaging via the wget command.


If a file begins with stage://, a copy of the file will be made in the work directory. Files get copied using dd with a 10MB block size.

file data <"stage:///home/davidkelly999/staging/absolute/stage/data.txt">;

Adding new protocols

The file cog/modules/provider-local/resources/cog-provider.properties allows you to set aliases. Define your new file protocol as an alias to "local". Suppose you would like to add a new protocol called "megaftp", you could add a line that looks like this:


In your swift script, you would reference the file as megaftp://path/to/file.txt.

You will need to recompile after making this change.

Examples of how swiftwrap is called

Using absolute pathnames

In this example, Swift tries to map the file below using an absolute path

file data <"/home/davidkelly999/staging/dd-absolute/data.txt">;
Table 2. _swiftwrap.wrapperstaging arguments











Using relative pathnames

Here is an example using relative pathnames in Swift.

file data <"data.txt">;
Table 3. _swiftwrap.wrapperstaging arguments