![]() ![]() Fortunately, deleting files and freeing up space is equally simple. ![]() Private static void deleteFile(Drive service, String fileId) fileId ID of the file to delete. Because Google Drive saves data from all of your Google accounts, its easy to run out of space. * Permanently delete a file, skipping the trash. Note: The code examples available for this method do not represent all supported programming languages (see the client libraries page for a list of supported languages). If successful, this method returns an empty response body. Request bodyĭo not supply a request body with this method. If you delete a file you own in a Google Drive Shared Drive on the web, it moves to the Trash (which you can access by clicking on More in the list on the. For more information, see the authentication and authorization page. Some scopes are restricted and require a security assessment for your app to use them. This request requires authorization with at least one of the following scopes: Scope Share a single item using a link Open a file in Google Docs, Sheets, or Slides. Whether the requesting application supports both My Drives and shared drives.ĭeprecated use supportsAllDrives instead. If you have shared the file with someone else, then in Sharing Settings you can click the X to remove a person from viewing the file any longer. In Sharing Settings they will appear as 'Is owner'. If an item is not in a shared drive and its last parent is deleted but the item itself is not, the item will be placed under its owner's root. 1 Answer Sorted by: 5 If the file is shared with you, then you cannot remove the other person's access, as they are the owner. Request HTTP request DELETE fileId Parameters Parameter nameĭeprecated. The currently authenticated user must own the file or be an organizer on the parent for shared drive files. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |