public string fileAppend(IVirtualPathProvider vfs, string virtualPath, object contents) { if (contents is string s) { vfs.AppendFile(virtualPath, s); } else if (contents is byte[] bytes) { vfs.AppendFile(virtualPath, bytes); } else if (contents is Stream stream) { vfs.AppendFile(virtualPath, stream); } else { return(null); } return(virtualPath); }
public string appendToFile(IVirtualPathProvider vfs, string virtualPath, object contents) { vfs.AppendFile(virtualPath, contents); return(virtualPath); }