C# Class Lucene.Net.Store.Azure.AzureDirectory

Inheritance: System.IO.Directory
Show file Open project: azure-contrib/AzureDirectory Class Usage Examples

Public Methods

Method Description
AzureDirectory ( Microsoft.WindowsAzure.Storage.CloudStorageAccount storageAccount, string containerName = null, Directory cacheDirectory = null, bool compressBlobs = false, string rootFolder = null ) : System

Create an AzureDirectory

ClearCache ( ) : void
ClearLock ( string name ) : void
CreateCachedOutputAsStream ( string name ) : StreamOutput
CreateContainer ( ) : void
CreateOutput ( System name ) : IndexOutput

Creates a new, empty file in the directory with the given name. Returns a stream writing this file.

DeleteFile ( System name ) : void

Removes an existing file in the directory.

FileExists ( String name ) : bool

Returns true if a file with the given name exists.

FileLength ( String name ) : long

Returns the length of a file in the directory.

FileModified ( String name ) : long

Returns the time the named file was last modified.

ListAll ( ) : String[]

Returns an array of strings, one for each file in the directory.

MakeLock ( System name ) : Lock

Construct a {@link Lock}.

OpenCachedInputAsStream ( string name ) : StreamInput
OpenInput ( System name ) : IndexInput

Returns a stream reading an existing file.

ShouldCompressFile ( string path ) : bool
TouchFile ( System name ) : void

Set the modified time of an existing file to now.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Closes the store.

Private Methods

Method Description
_initCacheDirectory ( Directory cacheDirectory ) : void

Method Details

AzureDirectory() public method

Create an AzureDirectory
public AzureDirectory ( Microsoft.WindowsAzure.Storage.CloudStorageAccount storageAccount, string containerName = null, Directory cacheDirectory = null, bool compressBlobs = false, string rootFolder = null ) : System
storageAccount Microsoft.WindowsAzure.Storage.CloudStorageAccount storage account to use
containerName string name of container (folder in blob storage)
cacheDirectory System.IO.Directory local Directory object to use for local cache
compressBlobs bool
rootFolder string path of the root folder inside the container
return System

ClearCache() public method

public ClearCache ( ) : void
return void

ClearLock() public method

public ClearLock ( string name ) : void
name string
return void

CreateCachedOutputAsStream() public method

public CreateCachedOutputAsStream ( string name ) : StreamOutput
name string
return StreamOutput

CreateContainer() public method

public CreateContainer ( ) : void
return void

CreateOutput() public method

Creates a new, empty file in the directory with the given name. Returns a stream writing this file.
public CreateOutput ( System name ) : IndexOutput
name System
return IndexOutput

DeleteFile() public method

Removes an existing file in the directory.
public DeleteFile ( System name ) : void
name System
return void

Dispose() protected method

Closes the store.
protected Dispose ( bool disposing ) : void
disposing bool
return void

FileExists() public method

Returns true if a file with the given name exists.
public FileExists ( String name ) : bool
name String
return bool

FileLength() public method

Returns the length of a file in the directory.
public FileLength ( String name ) : long
name String
return long

FileModified() public method

Returns the time the named file was last modified.
public FileModified ( String name ) : long
name String
return long

ListAll() public method

Returns an array of strings, one for each file in the directory.
public ListAll ( ) : String[]
return String[]

MakeLock() public method

Construct a {@link Lock}.
public MakeLock ( System name ) : Lock
name System the name of the lock file ///
return Lock

OpenCachedInputAsStream() public method

public OpenCachedInputAsStream ( string name ) : StreamInput
name string
return StreamInput

OpenInput() public method

Returns a stream reading an existing file.
public OpenInput ( System name ) : IndexInput
name System
return IndexInput

ShouldCompressFile() public method

public ShouldCompressFile ( string path ) : bool
path string
return bool

TouchFile() public method

Set the modified time of an existing file to now.
public TouchFile ( System name ) : void
name System
return void