Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.google.appengine.api.files
Class AppEngineFile

    java.lang.Object
      com.google.appengine.api.files.AppEngineFile

All Implemented Interfaces:
  java.io.Serializable

    public class AppEngineFile

extends java.lang.Object
implements java.io.Serializable

An `AppEngineFile` represents a file in one of the Google App Engine file systems.

A file has a path of the form `/<fileSystem>/<namePart>` . The path consists of a file system which is one of several identifiers for a Google App Engine file system, and a name part wich is an arbitrary String. For example "/blobstore/Aie7uHVwtvM" is a path in which "blobstore" is the file system and "Aie7uHVwtvM" is the name part.

The enum `AppEngineFile.FileSystem` represents the available file systems. Each file system has particular attributes regarding permanence, reliability availability, and cost.

In the current release of Google App Engine, `BLOBSTORE` is the only available file system. This file system stores files as blobs in the BlobStore.

App Engine files may only be accessed using a particular access pattern: Newly created files may be appended to until they are finalized. After a file is finalized it may be read, but it may no longer be written.

To create a new `BLOBSTORE` file use `FileService.createNewBlobFile(String)`. This returns an instance of `AppEngineFile` with a `FileSystem` of `BLOBSTORE` and an `AccessMode` of `WRITE`.

See Also:
  Serialized Form

Nested Class Summary
`static class` | `AppEngineFile.FileSystem` Represents the back-end storage location of a file.

Constructor Summary
`AppEngineFile(AppEngineFile.FileSystem fileSystem, java.lang.String namePart)` Constructs an `AppEngineFile` from the given data
`AppEngineFile(java.lang.String fullPath)` Constructs an `AppEngineFile` from the given data

Method Summary
`AppEngineFile.FileSystem` | `getFileSystem()` Returns the file system of the file.
`java.lang.String` | `getFullPath()` Returns the full path of the file.
`java.lang.String` | `getNamePart()` Returns the name part of the file.
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### AppEngineFile

    public AppEngineFile(AppEngineFile.FileSystem fileSystem,
                         java.lang.String namePart)

  Constructs an `AppEngineFile` from the given data

  Parameters:
    `fileSystem` - a `non-null FileSystem`.
    `namePart` - a `non-null` name part. Warning: Do not use the full path here.

### AppEngineFile

    public AppEngineFile(java.lang.String fullPath)

  Constructs an `AppEngineFile` from the given data

  Parameters:
    `fullPath` - a `non-null` full path. Warning: Do not use a name part here.

Method Detail

### getNamePart

    public java.lang.String getNamePart()

  Returns the name part of the file.

### getFullPath

    public java.lang.String getFullPath()

  Returns the full path of the file.

### getFileSystem

    public AppEngineFile.FileSystem getFileSystem()

  Returns the file system of the file.

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD