Class AppEngineFile
- java.lang.Object
-
- com.google.appengine.api.files.AppEngineFile
-
- All Implemented Interfaces:
- java.io.Serializable
Deprecated.
@Deprecated public class AppEngineFile extends java.lang.Object implements java.io.SerializableAnAppEngineFilerepresents 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.FileSystemrepresents the available file systems. Each file system has particular attributes regarding permanence, reliability availability, and cost.In the current release of Google App Engine,
BLOBSTOREandGSare the only available file systems. These file systems store files as blobs in the BlobStore and in Google Storage respectively.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
BLOBSTOREfile useFileService.createNewBlobFile(String). This returns an instance ofAppEngineFilewith aFileSystemofBLOBSTORE.To create a new
GSfile useFileService.createNewGSFile(GSFileOptions). This returns an instance ofAppEngineFilewith aFileSystemofGS. This instance cannot be used for reading. For a full file lifecycle example, seeFileService.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classAppEngineFile.FileSystemDeprecated.Represents the back-end storage location of a file.
-
Constructor Summary
Constructors Constructor and Description AppEngineFile(AppEngineFile.FileSystem fileSystem, java.lang.String namePart)Deprecated.Constructs anAppEngineFilefrom the given dataAppEngineFile(java.lang.String fullPath)Deprecated.Constructs anAppEngineFilefrom the given data
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description AppEngineFile.FileSystemgetFileSystem()Deprecated.Returns the file system of the file.java.lang.StringgetFullPath()Deprecated.Returns the full path of the file.java.lang.StringgetNamePart()Deprecated.Returns the name part of the file.booleanhasFinalizedName()Deprecated.booleanisReadable()Deprecated.Returns a boolean indicating whether or not this instance can be used for reading.booleanisWritable()Deprecated.Returns a boolean indicating whether or not this instance can be used for writing.java.lang.StringtoString()Deprecated.
-
-
-
Constructor Detail
-
AppEngineFile
public AppEngineFile(AppEngineFile.FileSystem fileSystem, java.lang.String namePart)
Deprecated.Constructs anAppEngineFilefrom the given data- Parameters:
fileSystem- anon-null FileSystem.namePart- anon-nullname part. Warning: Do not use the full path here.
-
AppEngineFile
public AppEngineFile(java.lang.String fullPath)
Deprecated.Constructs anAppEngineFilefrom the given data- Parameters:
fullPath- anon-nullfull path. Warning: Do not use a name part here.
-
-
Method Detail
-
getNamePart
public java.lang.String getNamePart()
Deprecated.Returns the name part of the file.
-
getFullPath
public java.lang.String getFullPath()
Deprecated.Returns the full path of the file.
-
getFileSystem
public AppEngineFile.FileSystem getFileSystem()
Deprecated.Returns the file system of the file.
-
toString
public java.lang.String toString()
Deprecated.- Overrides:
toStringin classjava.lang.Object
-
isWritable
public boolean isWritable()
Deprecated.Returns a boolean indicating whether or not this instance can be used for writing.
-
isReadable
public boolean isReadable()
Deprecated.Returns a boolean indicating whether or not this instance can be used for reading.
-
hasFinalizedName
public boolean hasFinalizedName()
Deprecated.- Returns:
- a boolean indicating whether or not this instance has a finalized filename.
-
-