Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Class

GoogleDriveTemporaryContentLease

Namespace OfficeIMO.GoogleWorkspace.Drive
Assembly OfficeIMO.GoogleWorkspace.Drive
Source revision a039964de4cc with working tree changes
Modifiers sealed

Tracks a publicly readable Drive file and its explicit cleanup result.

Inheritance

  • Object
  • GoogleDriveTemporaryContentLease

Remarks

The file has no automatic expiry or disposal lifecycle and remains public until GoogleDriveTemporaryContentLease.CleanupAsync deletes it successfully.

Usage

Explore 1 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Methods

public async Task<GoogleDriveCleanupReport> CleanupAsync(CancellationToken cancellationToken = default) #
Returns: Task<GoogleDriveCleanupReport>

Attempts to delete the temporary file and returns the persistent cleanup result.

Parameters

cancellationToken System.Threading.CancellationToken = default optionalposition: 0
public static async Task<GoogleDriveTemporaryContentLease> CreatePublicReadLeaseAsync(GoogleDriveClient client, Byte[] content, GoogleDriveUploadOptions options, TranslationReport? report = null, CancellationToken cancellationToken = default) #
Returns: Task<GoogleDriveTemporaryContentLease>

Uploads content, grants a non-discoverable public-reader permission, and returns an object for explicit cleanup.

Parameters

client OfficeIMO.GoogleWorkspace.Drive.GoogleDriveClient requiredposition: 0
content System.Byte[] requiredposition: 1
options OfficeIMO.GoogleWorkspace.Drive.GoogleDriveUploadOptions requiredposition: 2
report OfficeIMO.GoogleWorkspace.TranslationReport? = null optionalposition: 3
cancellationToken System.Threading.CancellationToken = default optionalposition: 4

Properties

public GoogleDriveFile File { get; } #

Gets metadata for the temporary Drive file.

public String PublicUri { get; } #

Gets the public download URI exposed until explicit cleanup deletes the file successfully.

public GoogleDriveCleanupReport CleanupReport { get; } #

Gets the cleanup report associated with this lease.