Add TempDir#62
Conversation
| type Filesystem interface { | ||
| Basic | ||
| TempFile | ||
| TempDir |
There was a problem hiding this comment.
Adding TempDir to the interface will force a major upgrade, I fill that doesn't worth to do it.
Maybe in the future with more updates.
|
Can't we implement it as an utility function, just as |
|
@smola - |
|
I think 👍 to keeping it in utils without interface changes. Utility functions that are present in the standard library are usually nice to have in billy. |
|
Ok, I left only implementation in utils. |
| @@ -1 +1,4 @@ | |||
| /coverage.txt | |||
| /vendor | |||
There was a problem hiding this comment.
should we remove that lines from .gitignore?. go-billy is not using dep right now.
There was a problem hiding this comment.
that's why I added ;) to avoid a mistake and commit vendor dir
|
shall we close it or merge it? |
|
ping @mcuadros |
| // Multiple programs calling TempDir simultaneously | ||
| // will not choose the same directory. It is the caller's responsibility | ||
| // to remove the directory when no longer needed. | ||
| func TempDir(fs billy.Dir, dir, prefix string) (name string, err error) { |
There was a problem hiding this comment.
It's not covered by any test
There was a problem hiding this comment.
@mcuadros - I've added 2 tests for TempDir and TempFile.
Signed-off-by: kuba-- <kuba@sourced.tech>
Signed-off-by: kuba-- kuba@sourced.tech
Closes: #54