move style hashing to file layer
1 file changed, 5 insertions(+), 0 deletions(-)
changed files
M internal/storage/files/writer.go → internal/storage/files/writer.go
@@ -9,6 +9,7 @@ "go.alanpearce.eu/homestead/internal/buffer" "go.alanpearce.eu/homestead/internal/content" "go.alanpearce.eu/homestead/internal/multifile" + "go.alanpearce.eu/homestead/internal/storage" "go.alanpearce.eu/x/log" "github.com/andybalholm/brotli"@@ -77,6 +78,10 @@ } fd.Close() return nil +} + +func (f *Files) WriteFile(file *storage.File, content *buffer.Buffer) error { + return f.Write(file.Path, content) } func (f *Files) write(pathname string, content *buffer.Buffer) (multifile.FileLike, error) {