Skip to content

Mecso2/zig-linux-mount

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zig-linux-mount

Simple one file zig library for mounting on linux

It does not spawn child processes, it uses the modern linux mount api.

logs

Info, warning and error messages are loged through std.log, in the mount scope, and therefore you can set what level do you want to see through std.option

pub const std_options: std.Options=.{
  log_scope_levels=&.{
    .{.scope=.mount, .level=.err},
  }
};

Examples

overlay

mount name /mountpoint -t overlay  -o ro,relatime,lowerdir=/lower,upperdir=/upper,workdir=/work
try mount.mount("name", "/mountpoint", "overlay", &.{
    .{ "lowerdir", "/lower" },
    .{ "upperdir", "/upper" },
    .{ "workdir", "/work" },
}, &.{"ro", "relatime"});

bind

mount /src /target --bind
try mount.bind("/src", "/target");

About

Simple one file zig library for mounting on linux

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages