# Synapse File Constructor

## Usage

File(path, parentId, synapseStore=TRUE, ...)

## Arguments

path
Path to the file in local file system, or URL to file on the internet
parentId
The Synapse ID of the parent Project or Folder in which to store the File (e.g. "syn101")
synapseStore
If 'synapseStore' is TRUE then the file specified by path will be uploaded to S3 when the constructed File object is passed to synStore(), else only the file location is saved, along with other metadata
...
Additional named parameters are interpreted as properties or annotations on the File

## Description

Constructor for File

## Details

If the parent Project has an associated data store, credentials to access the store should be placed in your '.synapseConfig' file: The .synapseConfig file goes in your home directory and is in the ".ini" format. Create a new section in the file for the server to be accessed. The section title is the protocol and host. Below, put lines for username and password, e.g.:

[sftp://remote.host.com]

## Value

The created File is returned. NOTE: This is an in-memory representation. To persist to Synapse use synStore().

## Slots

filePath

synapseStore
flag to tell synStore whether to store the file or just the loacation of the file, along with any metadata

fileHandle
Synapse fileHandle associated with the stored file

objects

attachOwn
internally used information to handle file caching

annotations
annotations set on the object

synapseEntityKind
in this case, 'File'

synapseWebUrl
Synapse web URL

generatedBy
the Activity which generated this File, if applicable (see Activity)

properties
Synapse properties for a File. Properties of interest include:
id
unique Synapse ID as set by the system upon synStore (not set by user)

versionNumber
Version of this File

name
user supplied name, usually the File name

description
user supplied description

Folder Project synGet synStore