C# 클래스 Google.PowerShell.CloudStorage.GoogleCloudStorageProvider

상속: System.Management.Automation.Provider.NavigationCmdletProvider, IContentCmdletProvider
파일 보기 프로젝트 열기: GoogleCloudPlatform/google-cloud-powershell

Private Properties

프로퍼티 타입 설명
DeleteObjects void
GetBucketModel BucketModel
GetChildItemBucketHelper void
GetContentStream Stream
GetNewService StorageService
ListAllProjects IEnumerable
ListBucketsAsync System.Threading.Tasks.Task
ListChildren IEnumerable
NewBucket Bucket
NewObject Google.Apis.Storage.v1.Data.Object
NewTelemetryReporter IReportCmdletResults
PerformActionOnBucketAndOptionallyUpdateCache void
RemoveBucket void
RemoveFolder void
UpdateBucketCacheAndPerformActionOnBucket Bucket>.Dictionary
WaitDeleteTasks void

공개 메소드들

메소드 설명
ClearContent ( string path ) : void

Clears the content of an object. Used by Clear-Content.

ClearContentDynamicParameters ( string path ) : object
GetContentReader ( string path ) : IContentReader

Gets a content reader to read the contents of a downloaded Google Cloud Storage object. Used by Get-Contents.

GetContentReaderDynamicParameters ( string path ) : object

Required by IContentCmdletProvider, along with GetContentReader(string). Returns null because we have no need for dynamic parameters on Get-Content.

GetContentWriter ( string path ) : IContentWriter

Gets a writer used to upload data to a Google Cloud Storage object. Used by Set-Content.

GetContentWriterDynamicParameters ( string path ) : object

보호된 메소드들

메소드 설명
CopyItem ( string path, string copyPath, bool recurse ) : void

Copies a Google Cloud Storage object or folder to another object or folder. Used by Copy-Item.

CopyItemDynamicParameters ( string path, string destination, bool recurse ) : object
GetChildItems ( string path, bool recurse ) : void

Writes the object descriptions of the items in the container to the output. Used by Get-ChildItem.

GetChildNames ( string path, ReturnContainers returnContainers ) : void

Writes the names of the children of the container to the output. Used for tab-completion.

GetItem ( string path ) : void

Writes the object describing the item to the output. Used by Get-Item.

HasChildItems ( string path ) : bool

Checks if a container actually contains items.

InitializeDefaultDrives ( ) : Collection

Creates a default Google Cloud Storage drive named gs.

IsItemContainer ( string path ) : bool

PowerShell uses this to check if an item is a container. All drives, all buckets, objects that end with "/", and prefixes to objects are containers.

IsValidPath ( string path ) : bool

Checks if a path is a legal string of characters. Shoudl pretty much always return null.

ItemExists ( string path ) : bool

PowerShell uses this to check if items exist.

NewItem ( string path, string itemTypeName, object newItemValue ) : void

Creates a new item at the given path.

NewItemDynamicParameters ( string path, string itemTypeName, object newItemValue ) : object
RemoveItem ( string path, bool recurse ) : void

Deletes a Google Cloud Storage object or bucket. Used by Remove-Item.

RemoveItemDynamicParameters ( string path, bool recurse ) : object
Stop ( ) : void

Dispose the resources used by the provider. Specifically the services.

비공개 메소드들

메소드 설명
DeleteObjects ( GcsPath gcsPath ) : void
GetBucketModel ( string bucket ) : BucketModel
GetChildItemBucketHelper ( Bucket bucket, bool recurse ) : void

Write out a bucket to the command line. If recurse is set to true, call GetChildItems on the bucket to process its children.

GetContentStream ( object newItemValue, NewGcsObjectDynamicParameters dynamicParameters ) : Stream
GetNewService ( ) : StorageService

This methods returns a new storage service.

ListAllProjects ( ) : IEnumerable
ListBucketsAsync ( Project project, BlockingCollection collections ) : System.Threading.Tasks.Task

Retrieves all buckets from the specified project and adding them to the blocking collection.

ListChildren ( GcsPath gcsPath, bool recurse, bool allPages = true ) : IEnumerable
NewBucket ( GcsPath gcsPath, NewGcsBucketDynamicParameters dynamicParams ) : Bucket
NewObject ( GcsPath gcsPath, NewGcsObjectDynamicParameters dynamicParameters, Stream contentStream ) : Google.Apis.Storage.v1.Data.Object
NewTelemetryReporter ( ) : IReportCmdletResults
PerformActionOnBucketAndOptionallyUpdateCache ( Action actionOnBucket ) : void

If the BucketCache is not out of date, simply perform the action on each bucket. Otherwise, we update the cache and perform the action while doing that (for example, we can write the bucket to the command line as they become available instead of writing all at once).

RemoveBucket ( GcsPath gcsPath, bool removeObjects ) : void
RemoveFolder ( GcsPath gcsPath, bool recurse ) : void
UpdateBucketCacheAndPerformActionOnBucket ( Action action ) : Bucket>.Dictionary

Update BucketCache and perform action on each of the bucket while doing so.

WaitDeleteTasks ( List deleteTasks ) : void

Waits on the list of delete tasks to compelete, updating progress as it does so.

메소드 상세

ClearContent() 공개 메소드

Clears the content of an object. Used by Clear-Content.
public ClearContent ( string path ) : void
path string The path of the object to clear.
리턴 void

ClearContentDynamicParameters() 공개 메소드

public ClearContentDynamicParameters ( string path ) : object
path string
리턴 object

CopyItem() 보호된 메소드

Copies a Google Cloud Storage object or folder to another object or folder. Used by Copy-Item.
protected CopyItem ( string path, string copyPath, bool recurse ) : void
path string The path to copy from.
copyPath string The path to copy to.
recurse bool If true, will copy all decendent objects as well.
리턴 void

CopyItemDynamicParameters() 보호된 메소드

protected CopyItemDynamicParameters ( string path, string destination, bool recurse ) : object
path string
destination string
recurse bool
리턴 object

GetChildItems() 보호된 메소드

Writes the object descriptions of the items in the container to the output. Used by Get-ChildItem.
protected GetChildItems ( string path, bool recurse ) : void
path string The path of the container.
recurse bool If true, get all descendents of the container, not just immediate children.
리턴 void

GetChildNames() 보호된 메소드

Writes the names of the children of the container to the output. Used for tab-completion.
protected GetChildNames ( string path, ReturnContainers returnContainers ) : void
path string The path to the container to get the children of.
returnContainers ReturnContainers The names of the children of the container.
리턴 void

GetContentReader() 공개 메소드

Gets a content reader to read the contents of a downloaded Google Cloud Storage object. Used by Get-Contents.
public GetContentReader ( string path ) : IContentReader
path string The path to the object to read.
리턴 IContentReader

GetContentReaderDynamicParameters() 공개 메소드

Required by IContentCmdletProvider, along with GetContentReader(string). Returns null because we have no need for dynamic parameters on Get-Content.
public GetContentReaderDynamicParameters ( string path ) : object
path string
리턴 object

GetContentWriter() 공개 메소드

Gets a writer used to upload data to a Google Cloud Storage object. Used by Set-Content.
public GetContentWriter ( string path ) : IContentWriter
path string The path of the object to upload to.
리턴 IContentWriter

GetContentWriterDynamicParameters() 공개 메소드

public GetContentWriterDynamicParameters ( string path ) : object
path string
리턴 object

GetItem() 보호된 메소드

Writes the object describing the item to the output. Used by Get-Item.
protected GetItem ( string path ) : void
path string The path of the item to get.
리턴 void

HasChildItems() 보호된 메소드

Checks if a container actually contains items.
protected HasChildItems ( string path ) : bool
path string The path to the container.
리턴 bool

InitializeDefaultDrives() 보호된 메소드

Creates a default Google Cloud Storage drive named gs.
protected InitializeDefaultDrives ( ) : Collection
리턴 Collection

IsItemContainer() 보호된 메소드

PowerShell uses this to check if an item is a container. All drives, all buckets, objects that end with "/", and prefixes to objects are containers.
protected IsItemContainer ( string path ) : bool
path string The path of the item to check.
리턴 bool

IsValidPath() 보호된 메소드

Checks if a path is a legal string of characters. Shoudl pretty much always return null.
protected IsValidPath ( string path ) : bool
path string The path to check.
리턴 bool

ItemExists() 보호된 메소드

PowerShell uses this to check if items exist.
protected ItemExists ( string path ) : bool
path string
리턴 bool

NewItem() 보호된 메소드

Creates a new item at the given path.
protected NewItem ( string path, string itemTypeName, object newItemValue ) : void
path string The path of the item ot create.
itemTypeName string The type of item to create. "Directory" is the only special one. /// That will create an object with a name ending in "/".
newItemValue object The value of the item to create. We assume it is a string.
리턴 void

NewItemDynamicParameters() 보호된 메소드

protected NewItemDynamicParameters ( string path, string itemTypeName, object newItemValue ) : object
path string
itemTypeName string
newItemValue object
리턴 object

RemoveItem() 보호된 메소드

Deletes a Google Cloud Storage object or bucket. Used by Remove-Item.
protected RemoveItem ( string path, bool recurse ) : void
path string The path to the object or bucket to remove.
recurse bool If true, will remove the desendants of the item as well. Required for a /// non-empty bucket.
리턴 void

RemoveItemDynamicParameters() 보호된 메소드

protected RemoveItemDynamicParameters ( string path, bool recurse ) : object
path string
recurse bool
리턴 object

Stop() 보호된 메소드

Dispose the resources used by the provider. Specifically the services.
protected Stop ( ) : void
리턴 void