C# Класс Google.PowerShell.CloudStorage.BucketModel

This class maintains a local description of the objects in a bucket. It is used by the GoogleCloudStorageProvider to prevent redundant service calls e.g. to discover if an object exists. It keeps track of real objects, which we treat as files, and of name prefixes, which act like folders. A real object named "myFolder/" will be both a prefix "myFolder" and an object "myFolder/".
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AddObject ( Google.Apis.Storage.v1.Data.Object gcsObject ) : void

Adds or updates a Google Cloud Storage object to the model.

BucketModel ( string bucket, StorageService service ) : System.Collections.Generic

Initializes the bucket model.

GetGcsObject ( string objectName ) : Google.Apis.Storage.v1.Data.Object

Gets the Google Cloud Storage object of a given object name.

HasChildren ( string objectName ) : bool
IsContainer ( string objectName ) : bool

Checks to see if the given object is a folder.

IsReal ( string objectName ) : bool

Checks if the given object is a real object. An object could "exist" but not be "real" if it is a prefix for another object (a logical folder that is not "real").

ObjectExists ( string objectName ) : bool

Checks if an object exists. If the model did not read all of the objects during its last update, it may make a service call if the object is not found in its data.

PopulateModel ( ) : void

Gets a clean set of data from the service. If the bucket has more than a single page of objects, the model will only take the first page.

Описание методов

AddObject() публичный Метод

Adds or updates a Google Cloud Storage object to the model.
public AddObject ( Google.Apis.Storage.v1.Data.Object gcsObject ) : void
gcsObject Google.Apis.Storage.v1.Data.Object The Google Cloud Storage object to add or update.
Результат void

BucketModel() публичный Метод

Initializes the bucket model.
public BucketModel ( string bucket, StorageService service ) : System.Collections.Generic
bucket string The name of the bucket this models.
service StorageService The storage service used to maintain the model.
Результат System.Collections.Generic

GetGcsObject() публичный Метод

Gets the Google Cloud Storage object of a given object name.
public GetGcsObject ( string objectName ) : Google.Apis.Storage.v1.Data.Object
objectName string
Результат Google.Apis.Storage.v1.Data.Object

HasChildren() публичный Метод

public HasChildren ( string objectName ) : bool
objectName string
Результат bool

IsContainer() публичный Метод

Checks to see if the given object is a folder.
public IsContainer ( string objectName ) : bool
objectName string The name of the object to check.
Результат bool

IsReal() публичный Метод

Checks if the given object is a real object. An object could "exist" but not be "real" if it is a prefix for another object (a logical folder that is not "real").
public IsReal ( string objectName ) : bool
objectName string The name of the object to check.
Результат bool

ObjectExists() публичный Метод

Checks if an object exists. If the model did not read all of the objects during its last update, it may make a service call if the object is not found in its data.
public ObjectExists ( string objectName ) : bool
objectName string
Результат bool

PopulateModel() публичный Метод

Gets a clean set of data from the service. If the bucket has more than a single page of objects, the model will only take the first page.
public PopulateModel ( ) : void
Результат void