mirror of https://github.com/SixLabors/ImageSharp
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
893 B
27 lines
893 B
// Copyright (c) Six Labors and contributors.
|
|
// Licensed under the Apache License, Version 2.0.
|
|
|
|
using System.IO;
|
|
|
|
namespace SixLabors.ImageSharp.IO
|
|
{
|
|
/// <summary>
|
|
/// A simple interface representing the filesystem.
|
|
/// </summary>
|
|
internal interface IFileSystem
|
|
{
|
|
/// <summary>
|
|
/// Returns a readable stream as defined by the path.
|
|
/// </summary>
|
|
/// <param name="path">Path to the file to open.</param>
|
|
/// <returns>A stream representing the file to open.</returns>
|
|
Stream OpenRead(string path);
|
|
|
|
/// <summary>
|
|
/// Creates or opens a file and returns it as a writeable stream as defined by the path.
|
|
/// </summary>
|
|
/// <param name="path">Path to the file to open.</param>
|
|
/// <returns>A stream representing the file to open.</returns>
|
|
Stream Create(string path);
|
|
}
|
|
}
|
|
|