Twoorb Plugins  1.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties
Twoorb.FileSystem.FileSystem Class Reference

File System asset for loading and using the different file system services More...

Inheritance diagram for Twoorb.FileSystem.FileSystem:

Public Types

enum  EServiceType { EServiceType.FTP, EServiceType.AWSS3 }
 The different types of services available More...
 

Public Member Functions

void CloseFileSystem ()
 Close the file system More...
 
EServiceType[] GetSupportedTypes ()
 Gets an array of supported service types More...
 

Static Public Member Functions

static void InitializeFileSystem (FileSystemProgressUpdateEventHandler progressUpdateHandler, FileSystemInitializedEventHandler onInitializeDone)
 Initializes the file system More...
 
static FileSystem LoadFileSystemResource (bool castException=true)
 Loads the File System Resource More...
 
static void Close ()
 Close the file system More...
 
static void RunFileSystem ()
 Updates the file system More...
 
static void UploadFile (string filePath, string fileName, string savePath, string saveName, FileSystemUploadEventHandler resultHandler)
 Uploads a file to the service More...
 
static void UploadDirectory (string uploadDirectory, string uploadPath, bool recursive, string searchPattern, FileSystemUploadEventHandler resultHandler)
 Uploads a directory to the service More...
 
static void DownloadFile (string filePath, string fileName, string savePath, string saveName, FileSystemDownloadEventHandler resultHandler)
 Download a file from the service More...
 
static void DownloadDirectory (string directoryPath, string savePath, bool recursive, string searchPattern, FileSystemDownloadEventHandler resultHandler)
 Download a directory from the service More...
 
static void GetDownloadUrl (string filePath, FileSystemGetDownloadUrlEventHandler eventHandler)
 Gets a download url to a specific file on the service More...
 
static void GetDownloadUrl (string filePath, FileSystemGetDownloadUrlWithFormEventHandler eventHandler)
 Gets a download url to a specific file on the service More...
 

Properties

static bool IsInitialized [get]
 Returns if the file system is Initialized More...
 
FileService FileService [get, set]
 Gets or sets the currently used file service More...
 
EServiceType SelectedServiceType [get, set]
 Gets or sets the selected default service type More...
 
ServiceSettingsFTP FTPSettings [get, set]
 Gets or sets the settings for FTP uploading More...
 
ServiceSettingsAWSS3 S3Settings [get, set]
 Gets or sets the settings for Amazon S3 More...
 
static string SystemAssetName [get]
 The name of the file system asset More...
 
static string UnityAssetFilePath [get]
 The relative unity path to the system asset in the unity project More...
 
static string FullResourcePath [get]
 The full path to the resource folder More...
 
static string FullAssetFilePath [get]
 The full path to the system asset More...
 
static string FullServiceAssetPath [get]
 The full path to the service asset More...
 
static string UnityServiceAssetPath [get]
 The relative unity path to the file service asset More...
 

Detailed Description

File System asset for loading and using the different file system services

Member Enumeration Documentation

The different types of services available

Enumerator
FTP 

FTP Service.

AWSS3 

Amazon S3 Service. http://aws.amazon.com/s3/

Member Function Documentation

static void Twoorb.FileSystem.FileSystem.Close ( )
static

Close the file system

void Twoorb.FileSystem.FileSystem.CloseFileSystem ( )

Close the file system

static void Twoorb.FileSystem.FileSystem.DownloadDirectory ( string  directoryPath,
string  savePath,
bool  recursive,
string  searchPattern,
FileSystemDownloadEventHandler  resultHandler 
)
static

Download a directory from the service

Parameters
directoryPathThe path of the directory to download
savePathThe path of where the directory should be saved
recursive
searchPatternSearch prefix to filter the search for files to download
resultHandlerThe callback returning the success of the operation
static void Twoorb.FileSystem.FileSystem.DownloadFile ( string  filePath,
string  fileName,
string  savePath,
string  saveName,
FileSystemDownloadEventHandler  resultHandler 
)
static

Download a file from the service

Parameters
filePathThe path to the folder where the file to download resides
fileNameThe name of the file
savePathThe path to the folder where the file should be saved
saveNameTha name of the file to download
resultHandlerThe callback returning the success of the operation
static void Twoorb.FileSystem.FileSystem.GetDownloadUrl ( string  filePath,
FileSystemGetDownloadUrlEventHandler  eventHandler 
)
static

Gets a download url to a specific file on the service

Parameters
filePathThe path on the fileservice(key) to the file you want the url for
eventHandlerCallback returning the success of the operation along with the url
static void Twoorb.FileSystem.FileSystem.GetDownloadUrl ( string  filePath,
FileSystemGetDownloadUrlWithFormEventHandler  eventHandler 
)
static

Gets a download url to a specific file on the service

Parameters
filePathThe path on the fileservice(key) to the file you want the url for
eventHandlerCallback returning the success of the operation along with the url AND a hashtable with headers for authentication(if necessary)
EServiceType [] Twoorb.FileSystem.FileSystem.GetSupportedTypes ( )

Gets an array of supported service types

Returns
An array of supported service types
static void Twoorb.FileSystem.FileSystem.InitializeFileSystem ( FileSystemProgressUpdateEventHandler  progressUpdateHandler,
FileSystemInitializedEventHandler  onInitializeDone 
)
static

Initializes the file system

Parameters
progressUpdateHandlerThe progress update callback
onInitializeDoneInitialize handler which is invoked when the system is initialized
static FileSystem Twoorb.FileSystem.FileSystem.LoadFileSystemResource ( bool  castException = true)
static

Loads the File System Resource

Parameters
castExceptionIf the operation should cast an exception upon error
Returns
The File System asset
static void Twoorb.FileSystem.FileSystem.RunFileSystem ( )
static

Updates the file system

static void Twoorb.FileSystem.FileSystem.UploadDirectory ( string  uploadDirectory,
string  uploadPath,
bool  recursive,
string  searchPattern,
FileSystemUploadEventHandler  resultHandler 
)
static

Uploads a directory to the service

Parameters
uploadDirectoryThe directory to upload
uploadPathThe path of where to save the file
recursiveIf subfolders and files should be included
searchPatternSearch prefix is the option to filter the search. If you only want to list objects in a specific folder, you set the folder name here to be added as a prefix to the search
resultHandlerThe callback returning the success of the operation
static void Twoorb.FileSystem.FileSystem.UploadFile ( string  filePath,
string  fileName,
string  savePath,
string  saveName,
FileSystemUploadEventHandler  resultHandler 
)
static

Uploads a file to the service

Parameters
filePathThe path to the folder where the file to upload resides
fileNameThe name of the file to upload
savePathThe path of where to save the file
saveNameThe name of the file once uploaded
resultHandlerThe callback returning the success of the operation

Property Documentation

FileService Twoorb.FileSystem.FileSystem.FileService
getset

Gets or sets the currently used file service

ServiceSettingsFTP Twoorb.FileSystem.FileSystem.FTPSettings
getset

Gets or sets the settings for FTP uploading

string Twoorb.FileSystem.FileSystem.FullAssetFilePath
staticget

The full path to the system asset

string Twoorb.FileSystem.FileSystem.FullResourcePath
staticget

The full path to the resource folder

string Twoorb.FileSystem.FileSystem.FullServiceAssetPath
staticget

The full path to the service asset

bool Twoorb.FileSystem.FileSystem.IsInitialized
staticget

Returns if the file system is Initialized

ServiceSettingsAWSS3 Twoorb.FileSystem.FileSystem.S3Settings
getset

Gets or sets the settings for Amazon S3

EServiceType Twoorb.FileSystem.FileSystem.SelectedServiceType
getset

Gets or sets the selected default service type

string Twoorb.FileSystem.FileSystem.SystemAssetName
staticget

The name of the file system asset

string Twoorb.FileSystem.FileSystem.UnityAssetFilePath
staticget

The relative unity path to the system asset in the unity project

string Twoorb.FileSystem.FileSystem.UnityServiceAssetPath
staticget

The relative unity path to the file service asset


The documentation for this class was generated from the following file: