I'm trying to use an api and I can't call any methods of this class
namespace Ipfs.Api
{
/// <summary>
/// Manages the files/directories in IPFS.
/// </summary>
/// <remarks>
/// <para>
/// This API is accessed via the <see cref="IpfsClient.FileSystem"/> property.
/// </para>
/// </remarks>
/// <seealso href="https://github.com/ipfs/interface-ipfs-core/tree/master/API/files">Files API</seealso>
public class FileSystemApi
{
IpfsClient ipfs;
Lazy<DagNode> emptyFolder;
internal FileSystemApi(IpfsClient ipfs)
{
this.ipfs = ipfs;
this.emptyFolder = new Lazy<DagNode>(() => ipfs.Object.NewDirectoryAsync().Result);
}
/// <summary>
/// Add a file to the interplanetary file system.
/// </summary>
/// <param name="path"></param>
public Task<FileSystemNode> AddFileAsync(string path)
{
return AddAsync(
new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read),
Path.GetFileName(path));
}
}
I want to use the API without modifying it, I can't declare an object because I can't call any constructors, and I can't call any of the methods without an object because they are not static.
What should I do?