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; } }
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); } }
public abstract bool FileExists(BackgroundStorageEntry file);
/// <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);
/// <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)); }
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); }
public override Uri GetPreviewUri(BackgroundStorageEntry file) { // this requires no authentication return(new Uri(baseAddress + file.Path.Substring(1) + "/preview")); }
public override Uri GetPreviewUri(BackgroundStorageEntry file) { // this requires no authentication return new Uri(baseAddress + file.Path.Substring(1) + "/preview"); }