func (f *File) Write(p []byte) (int, error) {
	if err := f.checkTempFile(); err != nil {
		return 0, err
	}
	n, err := f.tempFile.Write(p)
	if err != nil {
		return 0, err
	}
	f.isDirty = true
	return n, nil
}
Write implements the io.Writer interface.  Writes are performed against a temporary local file.  The temp file is
closed and flushed to Azure with f.Close() is called.
package azure
import (
	"fmt"
	"io"
	"io/ioutil"
	"os"
	"path"
	"strings"
	"time"
	"github.com/Azure/azure-storage-blob-go/azblob"
	"github.com/c2fo/vfs/v6"
	"github.com/c2fo/vfs/v6/backend"
	"github.com/c2fo/vfs/v6/utils"
)
type File struct {
	fileSystem *FileSystem
	container  string
	name       string
	tempFile   *os.File
	isDirty    bool
}
func (f *File) Close() error {
	if f.tempFile != nil {
		defer func() {
			_ = f.tempFile.Close()
			f.tempFile = nil
			f.isDirty = false
		}()
		client, err := f.fileSystem.Client()
		if err != nil {
			return err
		}
		if _, err := f.Seek(0, 0); err != nil {
			return err
		}
		if f.isDirty {
			if err := client.Upload(f, f.tempFile); err != nil {
				return err
			}
		}
	}
	return nil
}
func (f *File) Read(p []byte) (n int, err error) {
	if err := f.checkTempFile(); err != nil {
		return 0, err
	}
	return f.tempFile.Read(p)
}
func (f *File) Seek(offset int64, whence int) (int64, error) {
	if err := f.checkTempFile(); err != nil {
		return 0, nil
	}
	return f.tempFile.Seek(offset, whence)
}