sys

A set of unix utils in hare!
Log | Files | Refs | README

ln.ha (252B)


      1 use os;
      2 use getopt;
      3 
      4 export fn main() void = {
      5 	const cmd = getopt::parse(os::args,
      6 	"Create a hard link", 
      7 	"source file",
      8 	"link file");
      9 	defer getopt::finish(&cmd);
     10 
     11 	let source = cmd.args[0];
     12 	let link  = cmd.args[1];
     13 
     14 	os::link(source, link)!;
     15 };