Skip to content

Implement Path Verification Utility in Platform Layer #11

@baync180705

Description

@baync180705

Migrate and enhance the path validation logic from system/utils to the new internal/platform package. This function is required to safely handle user inputs before backup operations.

Requirements:

  • Create File: internal/platform/paths.go
  • Functionality: Implement VerifyInputPath(rawPath string) (string, error) which must:
    -- Sanitize input strings (remove quotes/whitespace).
    -- Expand tilde (~) to the home directory.
    -- Resolve to an absolute path.
    -- Confirm the file exists on disk (return error if missing).

Usage Scope:

  • WHERE TO USE: Strictly for Backup/Ingestion (e.g., validating custom key paths from CLI during ssh/gpg backup).
  • WHERE NOT TO USE: Do not use for Restoration targets (files that don't exist yet).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions