Files
duplicati/Duplicati/Library/Interface/IBackend_v2.cs
T
kenneth.skovhede@gmail.com 6cbe503d28 The logic for missing folders on the backends have changed.
Previously some backends autocreated a missing folder, and some threw an exception.

The new standard is that all backends throw the FolderMissingException on all access (except delete).
This means that the Test() and List() methods are now the same for all stock backends.
Third-party applications that use the backends should implement custom logic to auto-create the folders,
when the FolderMissingException is encountered.

Duplicati auto-creates missing folders, but this can be toggled through the new flag --disable-autocreate-folders.
In case the auto-create fails to detect a missing folder, there is now a "create-folder" action in the commandline version.

Update issue #102
Status: Fixed
The IBackend_v2 interface has the CreateFolder and Test methods.
The CreateFolder is exposed to the commandline interface with the action create-folder.

git-svn-id: https://duplicati.googlecode.com/svn/trunk@558 59da171f-624f-0410-aa54-27559c288bec
2010-10-23 11:40:43 +00:00

32 lines
1.2 KiB
C#

using System;
using System.Collections.Generic;
using System.Text;
namespace Duplicati.Library.Interface
{
/// <summary>
/// This interface extends the bare-minimum backend interface with some common methods
/// </summary>
public interface IBackend_v2 : IBackend
{
/// <summary>
/// The purpose of this method is to test the connection to the remote backend.
/// If any problem is encountered, this method should throw an exception.
/// If the encountered problem is a missing target &quot;folder&quot;,
/// this method should throw a <see cref="FolderMissingException"/>.
/// </summary>
void Test();
/// <summary>
/// The purpose of this method is to create the underlying &quot;folder&quot;.
/// This method will be invoked if the <see cref="Test"/> method throws a
/// <see cref="FolderMissingException"/>.
/// Backends that have no &quot;folder&quot; concept should not throw
/// a <see cref="FolderMissingException"/> during <see cref="Test"/>,
/// and this method should throw a <see cref="MissingMethodException"/>.
/// </summary>
void CreateFolder();
}
}