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);
        }
Exemple #2
0
        public string appendToFile(IVirtualPathProvider vfs, string virtualPath, object contents)
        {
            vfs.AppendFile(virtualPath, contents);

            return(virtualPath);
        }