Skip to content

Rust API #97

@lgarron

Description

@lgarron

There are some situations where other tools may want to call folderify:

They can do so on the commandline, but using a CLI for even the most trivial use cases is fraught with correctness and security bugs. For example, even this simple wrapper is unsafe:

#!/usr/bin/env bash

set -euo pipefail

folderify $1

(There are at least two trivial issues that will cause this to fail or do something unexpected when passed the name of a file. These can turn into security bugs for more sensitive programs, but I wouldn't put it past someone to construct a security bug using folderify's functionality.)

A good first step would be to define and publish a proper API in Rust, adapted from the clap definitions.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions