Core client library to communicate with Redundancy servers.
- .NET Framework 4
- Redundancy server version 1.9.15+
See http://redundancy.pfweb.eu/doc/1.9.15/index.html for more details
Authentification:
string userName = "username";
string password = "password";
string target = "http://server//Includes/api.inc.php";
// this method authorizes the given user and returns true or false
var authOk = Authentification.Authorize(userName, password, target);
The access to the Redundancy-Server will be done with diffrent kernel classes. At the moment there is only the "FileSystemKernel" implemented. Other ones following in next versions.
Example for accessing the Redundancy-FileSystem:
var fileSystemKernel = new FileSystemKernel(target);
// creating new dir in root direcotry
fileSystemKernel.CreateDirectory(-1, "Dir-Name");
// move any entry (file or direcotry)
var result = fileSystemKernel.MoveEntryById(1, 2);
// Upload file
using (var fileInfo = new FileInfo(@"DataPath"))
{
var result = fileSystemKernel.UploadFile(-1, fileInfo);
}
See LICENSE for more details