Zip with MacOs specific files

I read the topic Using the Zip & Unzip Feature and the documentation Folderitem.Zip .
Is there a way to keep MacOS specific files like the .DS_Store for folder-windows size, icons positions and customised icons of files/folders?

Nothing to do with my question but if you paste those lines codes:

Var someFolder As FolderItem = SpecialFolder.Desktop.Child("SomeFolder")
Var outputFile As FolderItem = someFolder.Zip

and verify them (Command-K) you will have a report that “outputFile is an unused local variable”.

And that’s correct. You made one assignment and never used outputFile anywhere.

One way would be to programmatically copy the contents of the folder your are zipping to a temp folder, skipping the .DS_Store file or anything else, then compressing that temp file.

The other way would be move the .DS_Store file to a temp location, zip the folder, then move it back.

Looks like the Zip() functionality is kind of half-baked. No mask (like “*.doc”), no flag “include sub-folders”, etc.

“It doesn’t have every feature I might want” <> “half-baked”. Language matters.

I started this FR for an optional delegate parameter that would allow the developer to filter easily. Please sign on or comment as needed.

https://tracker.xojo.com/xojoinc/xojo/-/issues/74460

1 Like

Basic features is not a question of “wanting”.

File a feature request for whatever you think is lacking, as I did.

1 Like

The current design of the function makes me not caring about it.

The point of an FR is to explain why a feature doesn’t meet your needs and suggest improvements that will at least get it closer.

But I know you know this, so this is really for other who might be reading this thread.

1 Like

Basic features is anyone’s need, not mine.

Making a full color canvas only able to use a black ink on a white canvas opens fair discussion that the canvas was bad designed since conception, I don’t need to say it does not fit my needs, it does not fit anyone’s need unless they want black on white painting. It works for very limited scenarios.

Compare with options from other languages. Are those limited as the proposition? That’s the question designers should ask themselves when sketching the functionalities.

I think there’s a bit of misunderstanding as to what your issue is. Are you looking to include files like .DS Store in your ZIP archive, or exclude them?

1 Like

You have exaggerated the limitations of the feature to force that analogy. In fact, you can create a zip with exactly the contents and structure you want, it’s just not as convenient as you’d like. I even explained how in my answer above.

Meanwhile you have offered nothing constructive, which is neither new nor surprising.

2 Likes

My dear, you should read the forum more times. And yes, everything I said here was constructive too, you just don’t like it.

I missed it. Where? I’ll try later.

This thread has wandered far afield from the original question, and I suspect it’s about to go even further. If you guys want to take it there, perhaps you should take it elsewhere.

3 Likes

Nope. There’s nothing to say anymore. My natural preference is deescalating things, not the other way.

You’re right. I would like @Thomas_ROBISSON to chime in on whether he can use either of my suggestions, or if anyone else has some useful options.

My interpretation of his question is that he wants to INCLUDE those special files, not exclude them - so I’ll be curious to hear what he says. :grin:

Well, I’ll be, you might be right. If so, my suggestions won’t help. Are the “.” files excluded automatically?