Improvements to GDrive implementation, started integration with KP2A app (file chooser not yet working)
This commit is contained in:
@@ -129,7 +129,7 @@ namespace keepass2android.Io
|
||||
return (!ioc.IsLocalFile()) && (ioc.CredSaveMode != IOCredSaveMode.SaveCred);
|
||||
}
|
||||
|
||||
public void CreateDirectory(IOConnectionInfo ioc)
|
||||
public void CreateDirectory(IOConnectionInfo ioc, string newDirName)
|
||||
{
|
||||
//TODO
|
||||
throw new NotImplementedException();
|
||||
|
||||
@@ -421,9 +421,9 @@ namespace keepass2android.Io
|
||||
return _cachedStorage.RequiresCredentials(ioc);
|
||||
}
|
||||
|
||||
public void CreateDirectory(IOConnectionInfo ioc)
|
||||
public void CreateDirectory(IOConnectionInfo ioc, string newDirName)
|
||||
{
|
||||
_cachedStorage.CreateDirectory(ioc);
|
||||
_cachedStorage.CreateDirectory(ioc, newDirName);
|
||||
}
|
||||
|
||||
public IEnumerable<FileDescription> ListContents(IOConnectionInfo ioc)
|
||||
|
||||
@@ -10,5 +10,7 @@ namespace keepass2android.Io
|
||||
public bool CanRead { get; set; }
|
||||
public bool CanWrite { get; set; }
|
||||
public long SizeInBytes { get; set; }
|
||||
|
||||
public String DisplayName { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -14,68 +14,13 @@ using KeePassLib.Serialization;
|
||||
|
||||
namespace keepass2android.Io
|
||||
{
|
||||
/*public class GDriveFileStorage: IFileStorage
|
||||
public class GoogleDriveFileStorage : JavaFileStorage
|
||||
{
|
||||
public IEnumerable<string> SupportedProtocols { get { yield return "gdrive"; } }
|
||||
public void Delete(IOConnectionInfo ioc)
|
||||
public GoogleDriveFileStorage(Context ctx, IKp2aApp app) :
|
||||
base(new Keepass2android.Javafilestorage.GoogleDriveFileStorage(), app)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool CheckForFileChangeFast(IOConnectionInfo ioc, string previousFileVersion)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public string GetCurrentFileVersionFast(IOConnectionInfo ioc)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Stream OpenFileForRead(IOConnectionInfo ioc)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public IWriteTransaction OpenWriteTransaction(IOConnectionInfo ioc, bool useFileTransaction)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
public bool CompleteIoId()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool? FileExists()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public string GetFilenameWithoutPathAndExt(IOConnectionInfo ioc)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool RequiresCredentials(IOConnectionInfo ioc)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void CreateDirectory(IOConnectionInfo ioc)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public IEnumerable<FileDescription> ListContents(IOConnectionInfo convertPathToIoc)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public FileDescription GetFileDescription(IOConnectionInfo ioc)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
@@ -105,7 +105,7 @@ namespace keepass2android.Io
|
||||
/// <summary>
|
||||
/// Creates the directory described by ioc
|
||||
/// </summary>
|
||||
void CreateDirectory(IOConnectionInfo ioc);
|
||||
void CreateDirectory(IOConnectionInfo ioc, string newDirName);
|
||||
|
||||
/// <summary>
|
||||
/// Lists the contents of the given path
|
||||
|
||||
@@ -172,11 +172,11 @@ namespace keepass2android.Io
|
||||
return false;
|
||||
}
|
||||
|
||||
public void CreateDirectory(IOConnectionInfo ioc)
|
||||
public void CreateDirectory(IOConnectionInfo ioc, string newDirName)
|
||||
{
|
||||
try
|
||||
{
|
||||
Jfs.CreateFolder(IocToPath(ioc));
|
||||
Jfs.CreateFolder(IocToPath(ioc), newDirName);
|
||||
}
|
||||
catch (FileNotFoundException e)
|
||||
{
|
||||
@@ -213,6 +213,7 @@ namespace keepass2android.Io
|
||||
{
|
||||
CanRead = e.CanRead,
|
||||
CanWrite = e.CanWrite,
|
||||
DisplayName = e.DisplayName,
|
||||
IsDirectory = e.IsDirectory,
|
||||
LastModified = JavaTimeToCSharp(e.LastModifiedTime),
|
||||
Path = e.Path,
|
||||
|
||||
Reference in New Issue
Block a user