gbr/erl/zip

Gleam erlang zip module:

 import gbr/erl
 import gbr/erl/zip

 pub fn main() -> Nil {
   let zip =
     erl.zip("compact.zip", ["./src/erl/zip.gleam"])
       |> zip.memory()
       |> zip.comment("Comment zip file")
       |> zip.cwd(".")
       |> zip.zip()

   case zip {
     Ok(zip.File(name, binary)) -> {
       todo
     }
     Error(_error) -> {
       todo
     }
   }
 }

Types

pub type File {
  File(name: String, content: String)
}

Constructors

  • File(name: String, content: String)
pub opaque type Zip

Values

pub fn comment(zip: Zip, comment: String) -> Zip
pub fn compress(zip: Zip, what: option.What) -> Zip
pub fn cooked(zip: Zip) -> Zip
pub fn cwd(in zip: Zip, cwd dir: String) -> Zip
pub fn extras(zip: Zip, extras: List(atom.Atom)) -> Zip
pub fn memory(zip: Zip) -> Zip
pub fn new(file name: String, from files: List(File)) -> Zip
pub fn uncompress(zip: Zip, what: option.What) -> Zip
pub fn verbose(zip: Zip) -> Zip
pub fn zip(from zip: Zip) -> Result(File, atom.Atom)
Search Document