Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement lookup #13

Closed
Tracked by #15
Bios-Marcel opened this issue Feb 6, 2023 · 1 comment
Closed
Tracked by #15

Implement lookup #13

Bios-Marcel opened this issue Feb 6, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@Bios-Marcel
Copy link
Owner

APIL:

type TrashedFileInfo interface {
    AbsPath() string
    DeletionDate() time.Time
}

// Lookup checks whether there is any file with a matching path. The path can
// be relative or absolute. Since a path can be deleted multiple times,
// resulting in multiple trashed versions, the return value is an array. If
// the error is empty, there were no matches, in which case the `error` will
// be `nil`.
func Lookup(path string) ([]*TrashedFileInfo, error) {
    // ....
}

The interface TrashedFileInfo allows to have more concrete implementations, allowing the user to extract more information where required and possible, but still allow us to cross compile when using the bare minimum.

@Bios-Marcel Bios-Marcel added the enhancement New feature or request label Feb 6, 2023
@Bios-Marcel
Copy link
Owner Author

Implemented in v2

Instead there's a Query function that comes with a Restore() function of the returned object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant