generated from ipfs/ipfs-repository-template
-
Notifications
You must be signed in to change notification settings - Fork 132
Open
Labels
need/triageNeeds initial labeling and prioritizationNeeds initial labeling and prioritization
Description
Maybe add to function WriteTo
the feature for write to exist directory?
two choices:
- Change exist function:
// WriteTo writes the given node to the local filesystem at fpath.
func WriteTo(nd Node, fpath string, toExist bool) error {
switch nd := nd.(type) {
...
case Directory:
err := os.Mkdir(fpath, os.ModePerm)
switch {
case errors.Is(err, os.ErrExist):
case err != nil:
return err
}
...
- Add a function with an additional argument
ignoreExist
or something else. Use exist fucntionWriteTo
like a wrapper:
// WriteTo writes the given node to the local filesystem at fpath.
func WriteTo(nd Node, fpath string) error {
return WriteToWithParams(nd, fpath, false)
}
Metadata
Metadata
Assignees
Labels
need/triageNeeds initial labeling and prioritizationNeeds initial labeling and prioritization