target.apidocs.com.google.api.services.drive.Drive.Parents.html Maven / Gradle / Ivy
Drive.Parents (Google Drive API v2-rev20240809-2.0.0)
com.google.api.services.drive
Class Drive.Parents
- java.lang.Object
-
- com.google.api.services.drive.Drive.Parents
-
-
Nested Class Summary
Nested Classes
Modifier and Type
Class and Description
class
Drive.Parents.Delete
class
Drive.Parents.Get
class
Drive.Parents.Insert
class
Drive.Parents.List
-
Constructor Summary
Constructors
Constructor and Description
Parents()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
Drive.Parents.Delete
delete(String fileId,
String parentId)
Removes a parent from a file.
Drive.Parents.Get
get(String fileId,
String parentId)
Gets a specific parent reference.
Drive.Parents.Insert
insert(String fileId,
ParentReference content)
Adds a parent folder for a file.
Drive.Parents.List
list(String fileId)
Lists a file's parents.
-
-
Method Detail
-
delete
public Drive.Parents.Delete delete(String fileId,
String parentId)
throws IOException
Removes a parent from a file.
Create a request for the method "parents.delete".
This request holds the parameters needed by the drive server. After setting any optional
parameters, call the AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
- Parameters:
fileId
- The ID of the file.
parentId
- The ID of the parent.
- Returns:
- the request
- Throws:
IOException
-
get
public Drive.Parents.Get get(String fileId,
String parentId)
throws IOException
Gets a specific parent reference.
Create a request for the method "parents.get".
This request holds the parameters needed by the drive server. After setting any optional
parameters, call the AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
- Parameters:
fileId
- The ID of the file.
parentId
- The ID of the parent.
- Returns:
- the request
- Throws:
IOException
-
insert
public Drive.Parents.Insert insert(String fileId,
ParentReference content)
throws IOException
Adds a parent folder for a file.
Create a request for the method "parents.insert".
This request holds the parameters needed by the drive server. After setting any optional
parameters, call the AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
- Parameters:
fileId
- The ID of the file.
content
- the ParentReference
- Returns:
- the request
- Throws:
IOException
-
list
public Drive.Parents.List list(String fileId)
throws IOException
Lists a file's parents.
Create a request for the method "parents.list".
This request holds the parameters needed by the drive server. After setting any optional
parameters, call the AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
- Parameters:
fileId
- The ID of the file.
- Returns:
- the request
- Throws:
IOException
Copyright © 2011–2024 Google. All rights reserved.