Skip to content

Implement secrets touch command #244

@tegefaulkes

Description

@tegefaulkes

Specification

touch serves two purposes

  1. Will create a new empty file if no file exists at that path.
  2. Will update the timestamps of a file if it already exists.

For our secrets touch command we need to support these two actions while working with normal file paths and secret paths. It should also support multiple paths for touching multiple files. Wild cards are supported as well but will not create files.

So we have two levels of functionality.

  1. Create files.
  2. Update file access times without modifying contents.

I don't know if we want to include updating the files access times. Most of the commands complexity will come from that.

Additional context

Related #32

Tasks

  1. Implement a secrets touch command.
  2. Must create a new empty secret or file if no file exists at the provided path.
  3. If secret or file exists then we update the updated and access time without modifying contents.
  4. It takes a varadic argument of file paths, so we can touch multiple files at a time.
  5. File paths and secret paths should be interchangeable.
  6. Touching to create a file can't operate recusively. So it won't create a directory for a touched file.
  7. Wildcards can be used for updating access times of files, but not for creating files.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions