Skip to content

Commit

Permalink
AvaloniaUI#6110 remove open folder for tizen
Browse files Browse the repository at this point in the history
  • Loading branch information
OmidID committed Jul 13, 2023
1 parent 3c3cf3e commit 11e0396
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/Tizen/Avalonia.Tizen/TizenStorageProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ internal class TizenStorageProvider : IStorageProvider

public bool CanSave => false;

public bool CanPickFolder => true;
public bool CanPickFolder => false;

public Task<IStorageBookmarkFile?> OpenFileBookmarkAsync(string bookmark)
{
throw new NotImplementedException();
return Task.FromException<IStorageBookmarkFile?>(
new PlatformNotSupportedException("Bookmark is not supported by Tizen"));
}

private static async Task CheckPermission()
Expand Down Expand Up @@ -111,12 +112,14 @@ public async Task<IReadOnlyList<IStorageFolder>> OpenFolderPickerAsync(FolderPic

public Task<IStorageBookmarkFolder?> OpenFolderBookmarkAsync(string bookmark)
{
throw new NotImplementedException();
return Task.FromException<IStorageBookmarkFolder?>(
new PlatformNotSupportedException("Open folder is not supported by Tize"));
}

public Task<IStorageFile?> SaveFilePickerAsync(FilePickerSaveOptions options)
{
throw new NotImplementedException();
return Task.FromException<IStorageFile?>(
new PlatformNotSupportedException("Save file picker is not supported by Tizen"));
}

public async Task<IStorageFile?> TryGetFileFromPathAsync(Uri filePath)
Expand Down Expand Up @@ -179,6 +182,4 @@ public async Task<IReadOnlyList<IStorageFolder>> OpenFolderPickerAsync(FolderPic
var storageFolder = new BclStorageFolder(new System.IO.DirectoryInfo(folder));
return Task.FromResult<IStorageFolder?>(storageFolder);
}


}

0 comments on commit 11e0396

Please sign in to comment.