Пример #1
0
        public Stream OpenFile(FileUri uri, UniversalFileMode mode, UniversalFileAccess access, UniversalFileShare share)
        {
            switch (uri.Location)
            {
            case StorageLocation.Bundle:
                return(Application.Context.Assets.Open(uri.RelativePath));

            case StorageLocation.Internal:
                return(File.Open(uri.AbsolutePath, (FileMode)mode, (FileAccess)access, (FileShare)share));

            case StorageLocation.External:
                return(File.Open(uri.AbsolutePath, (FileMode)mode, (FileAccess)access, (FileShare)share));

            default:
                return(null);
            }
        }
Пример #2
0
 public Stream OpenFile(FileUri uri, UniversalFileMode mode, UniversalFileAccess access, UniversalFileShare share)
 {
     return(File.Open(uri.AbsolutePath, (FileMode)mode, (FileAccess)access, (FileShare)share));
 }
Пример #3
0
 public Stream OpenFile(FileUri uri, UniversalFileMode mode, UniversalFileAccess access)
 {
     return(OpenFile(uri, mode, access, UniversalFileShare.None));
 }
Пример #4
0
 public Stream OpenFile(FileUri uri, UniversalFileMode mode, UniversalFileAccess access, UniversalFileShare share)
 {
     return(_fileSystemPlatform.OpenFile(uri, mode, access, share));
 }