Exemplo n.º 1
0
        public async Task <Stream> Open(string relativePath)
        {
            if (!await _fileStorageProvider.Exists(relativePath))
            {
                throw new HopexException("file not exists.");
            }

            return(await _fileStorageProvider.Open(relativePath));
        }
 /// <summary>
 /// Existses the specified storage key.
 /// </summary>
 /// <param name="storageKey">The storage key.</param>
 /// <returns>Task&lt;System.Boolean&gt;.</returns>
 public virtual async Task <bool> Exists(string storageKey)
 {
     return(await _provider.Exists(storageKey));
 }