Drive API v1 (revision 55)



com.google.api.services.drive
Class Drive.Files

java.lang.Object
  extended by com.google.api.services.drive.Drive.Files
Enclosing class:
Drive

public class Drive.Files
extends Object

The "files" collection of methods.


Nested Class Summary
 class Drive.Files.Get
           
 class Drive.Files.Insert
           
 class Drive.Files.Patch
           
 class Drive.Files.Update
           
 
Constructor Summary
Drive.Files()
           
 
Method Summary
 Drive.Files.Get get(String id)
          Gets a file's metadata by id.
 Drive.Files.Insert insert(File content)
          Inserts a file, and any settable metadata or blob content sent with the request.
 Drive.Files.Insert insert(File content, AbstractInputStreamContent mediaContent)
          Inserts a file, and any settable metadata or blob content sent with the request.
 Drive.Files.Patch patch(String id, File content)
          Updates file metadata and/or content.
 Drive.Files.Update update(String id, File content)
          Updates file metadata and/or content Create a request for the method "files.update".
 Drive.Files.Update update(String id, File content, AbstractInputStreamContent mediaContent)
          Updates file metadata and/or content Create a request for the method "files.update".
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Drive.Files

public Drive.Files()
Method Detail

get

public Drive.Files.Get get(String id)
                    throws IOException
Gets a file's metadata by id. Create a request for the method "files.get". This request holds the parameters needed by the the drive server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.

Parameters:
id - The id for the file in question.
Returns:
the request
Throws:
IOException

insert

public Drive.Files.Insert insert(File content)
                          throws IOException
Inserts a file, and any settable metadata or blob content sent with the request. Create a request for the method "files.insert". This request holds the parameters needed by the the drive server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.

Parameters:
content - the File
Returns:
the request
Throws:
IOException

insert

public Drive.Files.Insert insert(File content,
                                 AbstractInputStreamContent mediaContent)
                          throws IOException
Inserts a file, and any settable metadata or blob content sent with the request. Create a request for the method "files.insert". This request holds the parameters needed by the the drive server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.

This method should be used for uploading media content.

Parameters:
content - the File media metadata or null if none
mediaContent - The media HTTP content or null if none.
Returns:
the request
Throws:
IOException - if the initialization of the request fails

patch

public Drive.Files.Patch patch(String id,
                               File content)
                        throws IOException
Updates file metadata and/or content. This method supports patch semantics. Create a request for the method "files.patch". This request holds the parameters needed by the the drive server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.

Parameters:
id - The id for the file in question.
content - the File
Returns:
the request
Throws:
IOException

update

public Drive.Files.Update update(String id,
                                 File content)
                          throws IOException
Updates file metadata and/or content Create a request for the method "files.update". This request holds the parameters needed by the the drive server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.

Parameters:
id - The id for the file in question.
content - the File
Returns:
the request
Throws:
IOException

update

public Drive.Files.Update update(String id,
                                 File content,
                                 AbstractInputStreamContent mediaContent)
                          throws IOException
Updates file metadata and/or content Create a request for the method "files.update". This request holds the parameters needed by the the drive server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.

This method should be used for uploading media content.

Parameters:
id - The id for the file in question.
content - the File media metadata or null if none
mediaContent - The media HTTP content or null if none.
Returns:
the request
Throws:
IOException - if the initialization of the request fails