diff options
author | Kenneth Hsu <kennethhsu@gmail.com> | 2020-04-06 00:34:30 +0300 |
---|---|---|
committer | Kenneth Hsu <kennethhsu@gmail.com> | 2020-04-06 00:36:28 +0300 |
commit | 1249267f6ebaba7333230d5b47ed1591b56fab91 (patch) | |
tree | 185626a8eedd234ac8929f48c17c6d626abebd86 | |
parent | 16f54d2d72d4f5297d17f58e8921bfc85cbc62cb (diff) |
Remove unused members from Duplicati.Library.Common.
-rw-r--r-- | Duplicati/Library/Common/IO/DefineDosDevice.cs | 5 | ||||
-rw-r--r-- | Duplicati/Library/Common/IO/ISystemIO.cs | 10 | ||||
-rw-r--r-- | Duplicati/Library/Common/IO/SystemIOLinux.cs | 24 | ||||
-rw-r--r-- | Duplicati/Library/Common/IO/SystemIOWindows.cs | 31 |
4 files changed, 2 insertions, 68 deletions
diff --git a/Duplicati/Library/Common/IO/DefineDosDevice.cs b/Duplicati/Library/Common/IO/DefineDosDevice.cs index f6149bc04..6c98f26c8 100644 --- a/Duplicati/Library/Common/IO/DefineDosDevice.cs +++ b/Duplicati/Library/Common/IO/DefineDosDevice.cs @@ -71,11 +71,6 @@ namespace Duplicati.Library.Common.IO public string Drive { get { return m_drive; } }
/// <summary>
- /// Gets the path that this mapping represents
- /// </summary>
- public string Targetpath { get { return m_targetPath; } }
-
- /// <summary>
/// Creates a new mapping, using default settings
/// </summary>
/// <param name="path">The path to map</param>
diff --git a/Duplicati/Library/Common/IO/ISystemIO.cs b/Duplicati/Library/Common/IO/ISystemIO.cs index a96ba1893..2c3196324 100644 --- a/Duplicati/Library/Common/IO/ISystemIO.cs +++ b/Duplicati/Library/Common/IO/ISystemIO.cs @@ -18,8 +18,8 @@ using System;
using System.IO;
using System.Collections.Generic;
-using Duplicati.Library.Interface; - +using Duplicati.Library.Interface;
+
namespace Duplicati.Library.Common.IO
{
/// <summary>
@@ -28,15 +28,10 @@ namespace Duplicati.Library.Common.IO public interface ISystemIO
{
IFileEntry DirectoryEntry(string path);
- void DirectoryDelete(string path);
- void DirectoryDelete(string path, bool recursive);
void DirectoryCreate(string path);
bool DirectoryExists(string path);
void DirectorySetLastWriteTimeUtc(string path, DateTime time);
void DirectorySetCreationTimeUtc(string path, DateTime time);
- DateTime DirectoryGetLastWriteTimeUtc(string path);
- DateTime DirectoryGetCreationTimeUtc(string path);
-
IFileEntry FileEntry(string path);
void FileMove(string source, string target);
@@ -50,7 +45,6 @@ namespace Duplicati.Library.Common.IO long FileLength(string path);
FileStream FileOpenRead(string path);
FileStream FileOpenWrite(string path);
- FileStream FileOpenReadWrite(string path);
FileStream FileCreate(string path);
FileAttributes GetFileAttributes(string path);
void SetFileAttributes(string path, FileAttributes attributes);
diff --git a/Duplicati/Library/Common/IO/SystemIOLinux.cs b/Duplicati/Library/Common/IO/SystemIOLinux.cs index 92bb56a48..180867b48 100644 --- a/Duplicati/Library/Common/IO/SystemIOLinux.cs +++ b/Duplicati/Library/Common/IO/SystemIOLinux.cs @@ -26,10 +26,6 @@ namespace Duplicati.Library.Common.IO public struct SystemIOLinux : ISystemIO
{
#region ISystemIO implementation
- public void DirectoryDelete(string path)
- {
- Directory.Delete(NormalizePath(path));
- }
public void DirectoryCreate(string path)
{
@@ -81,11 +77,6 @@ namespace Duplicati.Library.Common.IO return File.OpenWrite(path);
}
- public FileStream FileOpenReadWrite(string path)
- {
- return File.Open(path, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.Read);
- }
-
public FileStream FileCreate(string path)
{
return File.Create(path);
@@ -157,16 +148,6 @@ namespace Duplicati.Library.Common.IO Directory.SetCreationTimeUtc(NormalizePath(path), time);
}
- public DateTime DirectoryGetLastWriteTimeUtc(string path)
- {
- return Directory.GetLastWriteTimeUtc(NormalizePath(path));
- }
-
- public DateTime DirectoryGetCreationTimeUtc(string path)
- {
- return Directory.GetCreationTimeUtc(NormalizePath(path));
- }
-
public void FileMove(string source, string target)
{
File.Move(source, target);
@@ -177,11 +158,6 @@ namespace Duplicati.Library.Common.IO return new FileInfo(path).Length;
}
- public void DirectoryDelete(string path, bool recursive)
- {
- Directory.Delete(NormalizePath(path), recursive);
- }
-
public Dictionary<string, string> GetMetadata(string file, bool isSymlink, bool followSymlink)
{
var f = NormalizePath(file);
diff --git a/Duplicati/Library/Common/IO/SystemIOWindows.cs b/Duplicati/Library/Common/IO/SystemIOWindows.cs index e91fb0537..615011100 100644 --- a/Duplicati/Library/Common/IO/SystemIOWindows.cs +++ b/Duplicati/Library/Common/IO/SystemIOWindows.cs @@ -192,12 +192,6 @@ namespace Duplicati.Library.Common.IO }
#region ISystemIO implementation
- public void DirectoryDelete(string path)
- {
- PathTooLongActionWrapper(System.IO.Directory.Delete,
- Alphaleonis.Win32.Filesystem.Directory.Delete, path, true);
- }
-
public void DirectoryCreate(string path)
{
PathTooLongVoidFuncWrapper(System.IO.Directory.CreateDirectory,
@@ -260,12 +254,6 @@ namespace Duplicati.Library.Common.IO : PathTooLongFuncWrapper(System.IO.File.OpenWrite, Alphaleonis.Win32.Filesystem.File.OpenWrite, path, true);
}
- public System.IO.FileStream FileOpenReadWrite(string path)
- {
- return PathTooLongFuncWrapper(p => System.IO.File.Open(p, System.IO.FileMode.OpenOrCreate, System.IO.FileAccess.ReadWrite, System.IO.FileShare.Read),
- p => Alphaleonis.Win32.Filesystem.File.Open(p, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.Read), path, true);
- }
-
public System.IO.FileStream FileCreate(string path)
{
return PathTooLongFuncWrapper(System.IO.File.Create, Alphaleonis.Win32.Filesystem.File.Create, path, true);
@@ -356,18 +344,6 @@ namespace Duplicati.Library.Common.IO p => Alphaleonis.Win32.Filesystem.File.SetCreationTimeUtc(p, time), path, true);
}
- public DateTime DirectoryGetLastWriteTimeUtc(string path)
- {
- return PathTooLongFuncWrapper(System.IO.Directory.GetLastWriteTimeUtc,
- Alphaleonis.Win32.Filesystem.Directory.GetLastWriteTimeUtc, path, true);
- }
-
- public DateTime DirectoryGetCreationTimeUtc(string path)
- {
- return PathTooLongFuncWrapper(System.IO.Directory.GetCreationTimeUtc,
- Alphaleonis.Win32.Filesystem.Directory.GetCreationTimeUtc, path, true);
- }
-
public void FileMove(string source, string target)
{
// We do not check if path is too long on target. If so, then we catch an exception.
@@ -383,13 +359,6 @@ namespace Duplicati.Library.Common.IO path, true);
}
- public void DirectoryDelete(string path, bool recursive)
- {
- PathTooLongActionWrapper(p => System.IO.Directory.Delete(p, recursive),
- p => Alphaleonis.Win32.Filesystem.Directory.Delete(p, recursive),
- path, true);
- }
-
public string GetPathRoot(string path)
{
return PathTooLongFuncWrapper(Path.GetPathRoot, AlphaFS.Path.GetPathRoot, path, false);
|