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

Add a small abstraction layer for xattr #918

Open
Schamper opened this issue Oct 28, 2024 · 0 comments
Open

Add a small abstraction layer for xattr #918

Schamper opened this issue Oct 28, 2024 · 0 comments
Labels
core Related to a core component of dissect.target enhancement New feature or request filesystem Related to a filesystem component

Comments

@Schamper
Copy link
Member

Currently we just return the raw implementation specific object for xattr on filesystems where we have implemented that (which I think is only extfs):

def attr(self) -> Any:
return self._resolve().entry.xattr
def lattr(self) -> Any:
return self.entry.xattr

We should add a small abstraction layer to unify this across filesystems, especially once we add more implementations: fox-it/dissect.xfs#37

Would be nice if this also took into account NTFS attributes. Maybe a simple "dataclass" with a name: str, value: bytes and a raw: Any of the implementation specific object?

@Schamper Schamper added enhancement New feature or request core Related to a core component of dissect.target filesystem Related to a filesystem component labels Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Related to a core component of dissect.target enhancement New feature or request filesystem Related to a filesystem component
Projects
None yet
Development

No branches or pull requests

1 participant