Comments (12)
Actually, how do I test? v4.Tar doesn't have OverwriteExisting
.
from archiver.
Nope, no need for fs.FS
. I just like the (albeit limited) standard interface. I needed a full-purpose one, implemented it, but that doesn't matter here.
Thanks for explaining!
from archiver.
It is in syft.
FYI, I also have some tar management in go-apk, under here. I wouldn't mind repeating it.
from archiver.
Hi, thanks for the issue. I'm no longer supporting v3 though -- does this happen in v4?
from archiver.
That is a good question. Now that I have a sample, I can try it out. Reporting back soon.
from archiver.
Yeah, it does. I will update the issue. But the fix likely is not the same
from archiver.
Actually, one sec. I might have run the wrong thing. I will post back here shortly.
from archiver.
D'oh, I'm sorry -- v4 doesn't have OverwriteExisting
because we changed how v4 does extractions. Archiver v4 doesn't actually do disk operations, it only does stream operations. So you call Extract()
and then you open the files to write to disk, this resolves the issue since you have complete control over it. 💯
from archiver.
I am trying to wrap my head around that. So it is similar to fs.WalkDir(), where you provide it a handler, and then do what you want with it?
Come to think of it, does it actually implement fs.FS
so that you could use fs.WalkDir()
on it?
from archiver.
Yes, you can call archiver.FileSystem()
to get a fs.FS
which you can walk. The extract method is a little similar to walking, and indeed it does let you walk the archive -- it may be more efficient to use Extract though, unless you need fs.FS
for something.
from archiver.
No problem. Just curious, what are you using archiver for?
Thanks for your detailed issue report btw, would love to see more like that.
from archiver.
Cool! We use syft with Caddy as part of our release workflow.
from archiver.
Related Issues (20)
- 7z should have Archive method HOT 3
- Using rewindReader as a public type allows external access HOT 2
- Recursive decompression 7z does not work HOT 8
- go:embed via []byte stream or fs.File support HOT 3
- Fails to read file from archiver.FileSystem when archive is .tar.zst HOT 6
- How to provide dictionary for ZSTD encoder/decoder? HOT 4
- ArchiveAsync interface changes HOT 3
- File.Open given to the handler for Tar.Extract can't be used after the handler has returned HOT 5
- cannot archiver rar format HOT 2
- why '7z' not supported by Command HOT 2
- Unable to decrypt 7-ZIP file with password (err: breader.ReadByte: no data!) HOT 1
- Unable to decrypt 7-ZIP file with password (err: breader.ReadByte: no data!) HOT 1
- Is 7z supported by 4.0 Library? HOT 1
- RAR signature not found HOT 4
- Return io.Reader from archiver.FileSystem.Open(filename) HOT 1
- func FilesFromDisk filenames arg, if path seperator is not system defined, pathInArchieve may be wrong path HOT 7
- Tar files created inside the directory they are compressing are not walkable HOT 5
- file 2G.file: writing data: archive/tar: write too long HOT 1
- Listing files of an Encrypted RAR Without Password Input HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from archiver.