Skip to content

simple plain code api to create DirectoryHierarchy #145

@vbatts

Description

@vbatts

ref: https://twitter.com/paultag/status/936063255948165120

@paultag

Hey @vbatts - I'm looking at using go-mtree -- is there an easy way to create a new DirectoryHierarchy in plain code (e.g. no archive or filesystem tree exists)?
The Entry pointers look nested enough to where I don't want to do that by hand :)

@vbatts

hey! good question. I haven't put thought to crafting one up in plain code. What do you have? os.FileInfo?

@paultag

Worse than that, sadly - just a path and a single key/value to set; it's not a standard use-case, and a "lolno" answer is maybe the right one :)

@vbatts

lolno is not the answer, but i haven't considered the case to make it easy. Are we talking like the output of libarchive/bsdtar mtree? or casync mtree?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions