Skip to content

Commit

Permalink
Improvements for v0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimirvivien committed Jun 9, 2024
1 parent 14fa016 commit a01187a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
10 changes: 10 additions & 0 deletions fs/file_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,13 @@ func (fw *FileWriter) From(r io.Reader) *FileWriter {
}
return fw
}

// File returns a file to write content to.
// Ensure to call Close when done writing to the writer.
func (fw *FileWriter) File() *os.File {
file, err := os.OpenFile(fw.path, fw.flags, fw.mode)
if err != nil {
fw.err = err
}
return file
}
4 changes: 4 additions & 0 deletions fs/fspath.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ func (p *FSPath) MkDir(mode fs.FileMode) *FSInfo {
return &FSInfo{path: p.path, info: info, mode: info.Mode(), vars: p.vars}
}

func (p *FSPath) MkDirTemp() *FSInfo {

}

Check failure on line 63 in fs/fspath.go

View workflow job for this annotation

GitHub Actions / Build

missing return) (typecheck)

Check failure on line 63 in fs/fspath.go

View workflow job for this annotation

GitHub Actions / Build

missing return (typecheck)

// Remove removes entry at path
func (p *FSPath) Remove() *FSInfo {
info, err := os.Stat(p.path)
Expand Down

0 comments on commit a01187a

Please sign in to comment.