Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cmd = &cli.Command{ Name: "ln", Usage: "Make links between files", Flags: []cli.Flag{ &cli.BoolFlag{Name: "symbolic, s", Usage: "Create symbolic link instead of hard link"}, }, Action: func(ctx context.Context, cmd *cli.Command) error { symbolic := cmd.Bool("symbolic") files := cmd.Args().Slice() if len(files) < 2 { return fmt.Errorf("missing file operand") } target := files[0] linkName := files[1] target, _ = filepath.Abs(target) if runtime.GOOS == "windows" { if symbolic { return createSymlink(target, linkName) } return createHardlink(target, linkName) } if symbolic { return os.Symlink(target, linkName) } return os.Link(target, linkName) }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.