## swiftwrap.wrapperstaging

Table 1. Command line arguments
Argument Description

-a

Command line arguments passed to app

-d

List of directories to create

-e

App to execute

-err

Where to write stderr

-i

Set stdin

-if

Input file(s)

-jobdir

Swift job directory

-of

Ouput file(s)

-out

Where to write stdout

-scratchdir

Swift scratch directory

-sk

Sitedir keep, true/false

-status

Provider or files

-urlprefix

URL Prefix

-wt

Wrapper log always transfer, true/false

Setting Description

use.wrapper.staging

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

wrapper.staging.local.server

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://).

## Protocols

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

### direct://

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">;

### file://

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://

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

### http://

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

### stage://

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">;

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:

alias=megaftp:local

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">;
 -if file://localhost//home/davidkelly999/staging/dd-absolute/data.txt -of catsn.0001.out -urlprefix file:///home/davidkelly999/staging/dd-absolute -d _root_/home/davidkelly999/staging/dd-absolute|. -a _root_/home/davidkelly999/staging/dd-absolute/data.txt

### Using relative pathnames

Here is an example using relative pathnames in Swift.

file data <"data.txt">;
 -if file://localhost/data.txt -of catsn.0001.out -urlprefix file:///home/davidkelly999/staging/dd-relative -d |. -a data.txt