C# 클래스 Microsoft.WindowsAzure.Commands.Test.Utilities.Common.FileSystemHelper

Utility used to create files and directories and clean them up when complete.
상속: IDisposable
파일 보기 프로젝트 열기: Azure/azure-powershell 1 사용 예제들

공개 메소드들

메소드 설명
CreateAzureSdkDirectoryAndImportPublishSettings ( ) : string

Create a temporary Azure SDK directory to simulate global files.

CreateAzureSdkDirectoryAndImportPublishSettings ( string publishSettingsPath ) : string

Create a temporary Azure SDK directory to simulate global files.

CreateDirectory ( string relativePath ) : string

Create a new directory relative to the rootPath.

CreateDirectoryWithPrebuiltPackage ( string packageName, string &package, string &configuration ) : void
CreateEmptyFile ( string relativePath ) : string

Create an empty file relative to the rootPath.

CreateNewService ( string serviceName ) : string

Create a new service with a given name and make that the current directory used by cmdlets.

Dispose ( ) : void

Destroy the files and directories created during the test.

FileSystemHelper ( SMTestBase testInstance ) : System

Initializes a new FileSystemHelper to a random temp directory.

FileSystemHelper ( SMTestBase testInstance, string rootPath ) : System

Initialize a new FileSystemHelper to a specific directory.

GetFullPath ( string relativePath ) : string

Get the full path to a file given a path relative to the FileSystemHelper's rootPath.

GetRelativePath ( string fullPath ) : string

Get the path of a file relative to the FileSystemHelper's rootPath.

GetTemporaryDirectoryName ( ) : string

Create a random directory name that doesn't yet exist on disk.

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

비공개 메소드들

메소드 설명
DisposeWatcher ( ) : void

Dispose of the FileSystemWatcher we're using to monitor changes to the FileSystem.

Log ( string format ) : void

Log a message from the FileSytemHelper.

메소드 상세

CreateAzureSdkDirectoryAndImportPublishSettings() 공개 메소드

Create a temporary Azure SDK directory to simulate global files.
public CreateAzureSdkDirectoryAndImportPublishSettings ( ) : string
리턴 string

CreateAzureSdkDirectoryAndImportPublishSettings() 공개 메소드

Create a temporary Azure SDK directory to simulate global files.
public CreateAzureSdkDirectoryAndImportPublishSettings ( string publishSettingsPath ) : string
publishSettingsPath string /// Path to the publish settings. ///
리턴 string

CreateDirectory() 공개 메소드

Create a new directory relative to the rootPath.
public CreateDirectory ( string relativePath ) : string
relativePath string Relative path to the directory.
리턴 string

CreateDirectoryWithPrebuiltPackage() 공개 메소드

public CreateDirectoryWithPrebuiltPackage ( string packageName, string &package, string &configuration ) : void
packageName string
package string
configuration string
리턴 void

CreateEmptyFile() 공개 메소드

Create an empty file relative to the rootPath.
public CreateEmptyFile ( string relativePath ) : string
relativePath string Relative path to the file.
리턴 string

CreateNewService() 공개 메소드

Create a new service with a given name and make that the current directory used by cmdlets.
public CreateNewService ( string serviceName ) : string
serviceName string Name of the service.
리턴 string

Dispose() 공개 메소드

Destroy the files and directories created during the test.
public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

protected Dispose ( bool disposing ) : void
disposing bool
리턴 void

FileSystemHelper() 공개 메소드

Initializes a new FileSystemHelper to a random temp directory.
public FileSystemHelper ( SMTestBase testInstance ) : System
testInstance SMTestBase /// Reference to the test class (to access its logging). ///
리턴 System

FileSystemHelper() 공개 메소드

Initialize a new FileSystemHelper to a specific directory.
public FileSystemHelper ( SMTestBase testInstance, string rootPath ) : System
testInstance SMTestBase /// Reference to the test class (to access its logging). ///
rootPath string The rootPath directory.
리턴 System

GetFullPath() 공개 메소드

Get the full path to a file given a path relative to the FileSystemHelper's rootPath.
public GetFullPath ( string relativePath ) : string
relativePath string Relative path.
리턴 string

GetRelativePath() 공개 메소드

Get the path of a file relative to the FileSystemHelper's rootPath.
public GetRelativePath ( string fullPath ) : string
fullPath string The full path to the file.
리턴 string

GetTemporaryDirectoryName() 공개 정적인 메소드

Create a random directory name that doesn't yet exist on disk.
public static GetTemporaryDirectoryName ( ) : string
리턴 string