"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Duplicati/Library/Common/IO/SystemIOLinux.cs" between
duplicati-2.0.5.104-2.0.5.104_canary_2020-03-25.tar.gz and duplicati-2.0.5.106-2.0.5.106_canary_2020-05-11.tar.gz

About: Duplicati is a backup client that securely stores encrypted, incremental, compressed backups on local devices, cloud storage services and remote file servers (for Windows, macOS and Linux). A remark: This officially "pre-release" seems to run stable.

SystemIOLinux.cs  (duplicati-2.0.5.104-2.0.5.104_canary_2020-03-25):SystemIOLinux.cs  (duplicati-2.0.5.106-2.0.5.106_canary_2020-05-11)
skipping to change at line 29 skipping to change at line 29
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Collections.Generic; using System.Collections.Generic;
using Duplicati.Library.Interface; using Duplicati.Library.Interface;
namespace Duplicati.Library.Common.IO namespace Duplicati.Library.Common.IO
{ {
public struct SystemIOLinux : ISystemIO public struct SystemIOLinux : ISystemIO
{ {
#region ISystemIO implementation #region ISystemIO implementation
public void DirectoryDelete(string path)
{
Directory.Delete(NormalizePath(path));
}
public void DirectoryCreate(string path) public void DirectoryCreate(string path)
{ {
Directory.CreateDirectory(NormalizePath(path)); Directory.CreateDirectory(NormalizePath(path));
} }
public bool DirectoryExists(string path) public bool DirectoryExists(string path)
{ {
return Directory.Exists(NormalizePath(path)); return Directory.Exists(NormalizePath(path));
} }
skipping to change at line 84 skipping to change at line 80
public FileStream FileOpenRead(string path) public FileStream FileOpenRead(string path)
{ {
return File.OpenRead(path); return File.OpenRead(path);
} }
public FileStream FileOpenWrite(string path) public FileStream FileOpenWrite(string path)
{ {
return File.OpenWrite(path); return File.OpenWrite(path);
} }
public FileStream FileOpenReadWrite(string path)
{
return File.Open(path, FileMode.OpenOrCreate, FileAccess.ReadWrite,
FileShare.Read);
}
public FileStream FileCreate(string path) public FileStream FileCreate(string path)
{ {
return File.Create(path); return File.Create(path);
} }
public FileAttributes GetFileAttributes(string path) public FileAttributes GetFileAttributes(string path)
{ {
return File.GetAttributes(NormalizePath(path)); return File.GetAttributes(NormalizePath(path));
} }
skipping to change at line 159 skipping to change at line 150
public void DirectorySetLastWriteTimeUtc(string path, DateTime time) public void DirectorySetLastWriteTimeUtc(string path, DateTime time)
{ {
Directory.SetLastWriteTimeUtc(NormalizePath(path), time); Directory.SetLastWriteTimeUtc(NormalizePath(path), time);
} }
public void DirectorySetCreationTimeUtc(string path, DateTime time) public void DirectorySetCreationTimeUtc(string path, DateTime time)
{ {
Directory.SetCreationTimeUtc(NormalizePath(path), time); 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) public void FileMove(string source, string target)
{ {
File.Move(source, target); File.Move(source, target);
} }
public long FileLength(string path) public long FileLength(string path)
{ {
return new FileInfo(path).Length; 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 isSymlin k, bool followSymlink) public Dictionary<string, string> GetMetadata(string file, bool isSymlin k, bool followSymlink)
{ {
var f = NormalizePath(file); var f = NormalizePath(file);
var dict = new Dictionary<string, string>(); var dict = new Dictionary<string, string>();
var n = UnixSupport.File.GetExtendedAttributes(f, isSymlink, followS ymlink); var n = UnixSupport.File.GetExtendedAttributes(f, isSymlink, followS ymlink);
if (n != null) if (n != null)
foreach(var x in n) foreach(var x in n)
dict["unix-ext:" + x.Key] = Convert.ToBase64String(x.Value); dict["unix-ext:" + x.Key] = Convert.ToBase64String(x.Value);
 End of changes. 4 change blocks. 
25 lines changed or deleted 0 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)