Class GSFile

  • public class GSFile
    extends FileMetadata
    A Google Cloud Storage object represented by a local file in blobstore. Appendable versions of GSFiles have paths of the form /gs/writable:random?name=bucket%2fkey. Unfinalized bytes are stored in memory. Finalizing an object copies the bytes to a local blobstore file, which is accessible at /gs/bucket/key.
    • Field Detail


        public static final java.lang.String FILE_SYSTEM

        public static final java.lang.String CREATION_HANDLE_PREFIX
        See Also:
        Constant Field Values
    • Method Detail

      • buildWritablePath

        public static java.lang.String buildWritablePath(java.lang.String randomString,
                                                         java.lang.String fileName)
      • create

        public static FileMetadata create(LocalFileService localFileService,
                                          Clock clock,
                                          java.lang.String fileName,
                                          java.lang.String randomString,
                                          ContentType contentType,
                                          java.util.Map<java.lang.String,java.lang.String> parameters)
        Creates a new instance. There are two cases: 1) A create request 2) A read request for a special read-only file.
      • getBlobInfo

        public getBlobInfo()
        Specified by: