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/".
파일 보기 프로젝트 열기: GoogleCloudPlatform/google-cloud-powershell 1 사용 예제들

공개 메소드들

메소드 설명
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