Skip to content

archive/zip: improve Writer.Create documentation on how to add directories #24018

Description

@gonutz

I tried to add an empty folder to a zip.Writer with zip.Writer.Create. From the docs it is not clear how to do this. There is a google group post that provides the solution, which is to add a slash at the end of the path given to zip.Writer.Create.

I suggest adding this detail to the documentation comment on zip.Writer.Create, e.g. "... To create a folder instead of a file, add a trailing slash to the path.".

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocumentationIssues describing a change to documentation.FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.help wanted

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions