forked from imurvai/brickcontroller2
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathSharedFileStorageService.cs
More file actions
41 lines (36 loc) · 1.17 KB
/
Copy pathSharedFileStorageService.cs
File metadata and controls
41 lines (36 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
using System;
using BrickController2.Helpers;
using BrickController2.PlatformServices.SharedFileStorage;
namespace BrickController2.iOS.PlatformServices.SharedFileStorage
{
public class SharedFileStorageService : NotifyPropertyChangedSource, ISharedFileStorageService
{
public bool _isPermissionGranted = false;
public bool IsSharedStorageAvailable => IsPermissionGranted && SharedStorageDirectory != null;
public bool IsPermissionGranted
{
get { return _isPermissionGranted; }
set
{
_isPermissionGranted = value;
RaisePropertyChanged();
RaisePropertyChanged(nameof(IsSharedStorageAvailable));
}
}
public string SharedStorageDirectory => SharedStorageBaseDirectory;
public string SharedStorageBaseDirectory
{
get
{
try
{
return Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
}
catch (Exception)
{
return null;
}
}
}
}
}