It looks like 004 (octal) is the flag for directories on
linux, but it does seem that std.zip is explicitly returning 0 if
the file was created on the opposite platform re: Posix vs
Windows, which is... odd.
@property @nogc nothrow uint fileAttributes() const
{
version (Posix)
{
On Wednesday, 12 February 2020 at 05:59:53 UTC, cc wrote:
On Monday, 3 February 2020 at 13:26:38 UTC, mark wrote:
I'm using std.zip.ZipArchive to read zip files, e.g.:
[snip]
I couldn't find one either, I had to do this:
version(Windows) {
enum uint FILE_ATTRIBUTE_DIRECTORY = 0x10;
}
On Monday, 3 February 2020 at 13:26:38 UTC, mark wrote:
I'm using std.zip.ZipArchive to read zip files, e.g.:
auto zip = new ZipArchive(read(filename));
// ...
foreach (name, member; zip.directory) {
if (name.endsWith('/')) // skip dirs
continue;
mkdirRecu
On Monday, 3 February 2020 at 13:26:38 UTC, mark wrote:
I'm using std.zip.ZipArchive to read zip files, e.g.:
auto zip = new ZipArchive(read(filename));
// ...
foreach (name, member; zip.directory) {
if (name.endsWith('/')) // skip dirs
continue;
mkdirRecu
I'm using std.zip.ZipArchive to read zip files, e.g.:
auto zip = new ZipArchive(read(filename));
// ...
foreach (name, member; zip.directory) {
if (name.endsWith('/')) // skip dirs
continue;
mkdirRecurse(dirName(name));
zip.expand(member);
w