com.strongloop.android.loopback

## Class File

- java.lang.Object
- - com.strongloop.android.remoting.VirtualObject
  - - com.strongloop.android.loopback.File

    public class File
    extends VirtualObject

### Nested Class Summary

Nested Classes
`static interface` `File.DownloadCallback`

### Constructor Summary

Constructors
Constructor and Description
`File()`

### Method Summary

Methods
`void` `delete(VoidCallback callback)` Delete this file.
`void` `download(File.DownloadCallback callback)` Download content of this file.
`void` `download(java.io.File localFile, VoidCallback callback)` Download content of this file to a local file.
`java.lang.String` `getContainer()` Name of the container this file belongs to.
`Container` `getContainerRef()`
`java.lang.String` `getName()` The name of the file, e.g.
`java.lang.String` `getUrl()` The URL of the file.
`void` `setContainerRef(Container container)`
`void` `setName(java.lang.String name)`
`void` `setUrl(java.lang.String url)`

### Methods inherited from class com.strongloop.android.remoting.VirtualObject

`getCreationParameters, getRepository, invokeMethod, invokeMethod, setCreationParameters, setRepository, toMap`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### File

    public File()

### Method Detail

#### setName

    public void setName(java.lang.String name)

#### getName

    public java.lang.String getName()

The name of the file, e.g. "image.gif"

Returns:
  the name

#### setUrl

    public void setUrl(java.lang.String url)

#### getUrl

    public java.lang.String getUrl()

The URL of the file.

Returns:
  the URL

#### setContainerRef

    public void setContainerRef(Container container)

#### getContainerRef

    public Container getContainerRef()

#### getContainer

    public java.lang.String getContainer()

Name of the container this file belongs to.

Returns:
  the container name

#### download

    public void download(File.DownloadCallback callback)

Download content of this file.

Parameters:
  `callback` - The callback to be executed when finished.

#### download

    public void download(java.io.File localFile,
                VoidCallback callback)

Download content of this file to a local file.

Parameters:
  `localFile` - Path to the local file.
  `callback` - The callback to be executed when finished.

#### delete

    public void delete(VoidCallback callback)

Delete this file.

Parameters:
  `callback` - The callback to be executed when finished.