C# Class Microsoft.WindowsAzure.Commands.Storage.File.StorageClientExtensions

Provides extension methods for storage client lib.
Exibir arquivo Open project: Azure/azure-powershell

Public Methods

Method Description
GetBaseName ( this file ) : string

Gets the base name of a CloudFile item.

This is to work around XSCL bug 1391878 where CloudFile.Name sometimes returns base name and sometimes returns full path.

GetDirectoryReferenceByPath ( this currentDirectory, string path ) : Microsoft.WindowsAzure.Storage.File.CloudFileDirectory

Gets the reference to a cloud file directory object from the provided base folder and the given path.

GetFileReferenceByPath ( this currentDirectory, string path ) : Microsoft.WindowsAzure.Storage.File.CloudFile

Gets the reference to a cloud file object from the provided base folder and the given path.

GetFullPath ( this item ) : string

Gets the full path of a file/directory.

Method Details

GetBaseName() public static method

Gets the base name of a CloudFile item.
This is to work around XSCL bug 1391878 where CloudFile.Name sometimes returns base name and sometimes returns full path.
public static GetBaseName ( this file ) : string
file this Indicating the CloudFile item.
return string

GetDirectoryReferenceByPath() public static method

Gets the reference to a cloud file directory object from the provided base folder and the given path.
public static GetDirectoryReferenceByPath ( this currentDirectory, string path ) : Microsoft.WindowsAzure.Storage.File.CloudFileDirectory
currentDirectory this /// Indicating the base directory. ///
path string /// Indicating the path to the target folder in the form of a /// collection of strings which indicated each sub folder. ///
return Microsoft.WindowsAzure.Storage.File.CloudFileDirectory

GetFileReferenceByPath() public static method

Gets the reference to a cloud file object from the provided base folder and the given path.
public static GetFileReferenceByPath ( this currentDirectory, string path ) : Microsoft.WindowsAzure.Storage.File.CloudFile
currentDirectory this /// Indicating the base directory. ///
path string /// Indicating the path to the target file in the form of a /// collection of strings which indicated each sub folder and the file /// name. ///
return Microsoft.WindowsAzure.Storage.File.CloudFile

GetFullPath() public static method

Gets the full path of a file/directory.
public static GetFullPath ( this item ) : string
item this Indicating the file/directory object.
return string