예제 #1
0
 public override bool FileExists(BackgroundStorageEntry file)
 {
     var path = file.Path;
     try
     {
         var entries = GetListing(file.Parent);
         return entries.Any(e => e.Path == path);
     }
     catch (FileNotFoundException)
     {
         return false;
     }
 }
예제 #2
0
        public override bool FileExists(BackgroundStorageEntry file)
        {
            var path = file.Path;

            try
            {
                var entries = GetListing(file.Parent);
                return(entries.Any(e => e.Path == path));
            }
            catch (FileNotFoundException)
            {
                return(false);
            }
        }
예제 #3
0
 public abstract bool FileExists(BackgroundStorageEntry file);
예제 #4
0
 /// <summary>
 /// Gets the URI of the preview of a background file, if available.
 /// If it's not available, this will return the same as GetFileUri().
 /// </summary>
 /// <param name="file">The file.</param>
 /// <returns>The URI of a preview of the file.</returns>
 public abstract Uri GetPreviewUri(BackgroundStorageEntry file);
예제 #5
0
 /// <summary>
 /// Gets the URI of a background file.
 /// </summary>
 /// <param name="file">The file.</param>
 /// <returns>The file's URI.</returns>
 public abstract Uri GetFileUri(BackgroundStorageEntry file);
 public override bool FileExists(BackgroundStorageEntry file)
 {
     return(File.Exists(GetFileUri(file).LocalPath));
 }
 /// <summary>
 /// Gets the URI of the preview of a background file, if available.
 /// If it's not available, this will return the same as GetFileUri().
 /// </summary>
 /// <param name="file">The file.</param>
 /// <returns>
 /// The URI of a preview of the file.
 /// </returns>
 public override Uri GetPreviewUri(BackgroundStorageEntry file)
 {
     return(GetFileUri(file));
 }
        /// <summary>
        /// Gets the URI of a background file.
        /// </summary>
        /// <param name="file">The file.</param>
        /// <returns>
        /// The file's URI.
        /// </returns>
        public override Uri GetFileUri(BackgroundStorageEntry file)
        {
            var realPath = Path.Combine(directory, file.Path.Substring(1).Replace('/', Path.DirectorySeparatorChar));

            return(new Uri(realPath));
        }
예제 #9
0
 public override bool FileExists(BackgroundStorageEntry file)
 {
     return File.Exists(GetFileUri(file).LocalPath);
 }
예제 #10
0
 /// <summary>
 /// Gets the URI of the preview of a background file, if available.
 /// If it's not available, this will return the same as GetFileUri().
 /// </summary>
 /// <param name="file">The file.</param>
 /// <returns>
 /// The URI of a preview of the file.
 /// </returns>
 public override Uri GetPreviewUri(BackgroundStorageEntry file)
 {
     return GetFileUri(file);
 }
예제 #11
0
 /// <summary>
 /// Gets the URI of a background file.
 /// </summary>
 /// <param name="file">The file.</param>
 /// <returns>
 /// The file's URI.
 /// </returns>
 public override Uri GetFileUri(BackgroundStorageEntry file)
 {
     var realPath = Path.Combine(directory, file.Path.Substring(1).Replace('/', Path.DirectorySeparatorChar));
     return new Uri(realPath);
 }
예제 #12
0
 public override Uri GetPreviewUri(BackgroundStorageEntry file)
 {
     // this requires no authentication
     return(new Uri(baseAddress + file.Path.Substring(1) + "/preview"));
 }
예제 #13
0
 public override Uri GetPreviewUri(BackgroundStorageEntry file)
 {
     // this requires no authentication
     return new Uri(baseAddress + file.Path.Substring(1) + "/preview");
 }
예제 #14
0
 public abstract bool FileExists(BackgroundStorageEntry file);
예제 #15
0
 /// <summary>
 /// Gets the URI of the preview of a background file, if available.
 /// If it's not available, this will return the same as GetFileUri().
 /// </summary>
 /// <param name="file">The file.</param>
 /// <returns>The URI of a preview of the file.</returns>
 public abstract Uri GetPreviewUri(BackgroundStorageEntry file);
예제 #16
0
 /// <summary>
 /// Gets the URI of a background file.
 /// </summary>
 /// <param name="file">The file.</param>
 /// <returns>The file's URI.</returns>
 public abstract Uri GetFileUri(BackgroundStorageEntry file);