forked from log2timeline/dfvfs
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added attributes support for fsext back-end log2timeline#504
- Loading branch information
1 parent
ddeabfe
commit b5e5d0d
Showing
9 changed files
with
188 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# -*- coding: utf-8 -*- | ||
"""The EXT attribute implementations.""" | ||
|
||
from dfvfs.lib import errors | ||
from dfvfs.vfs import attribute | ||
|
||
|
||
class EXTExtendedAttribute(attribute.Attribute): | ||
"""EXT extended attribute that uses pyfsext.""" | ||
|
||
def __init__(self, fsext_extended_attribute): | ||
"""Initializes an attribute. | ||
Args: | ||
fsext_extended_attribute (pyfsext.extended_attribute): EXT extended | ||
attribute. | ||
Raises: | ||
BackEndError: if the pyfsext extended attribute is missing. | ||
""" | ||
if not fsext_extended_attribute: | ||
raise errors.BackEndError('Missing pyfsext extended attribute.') | ||
|
||
super(EXTExtendedAttribute, self).__init__() | ||
self._fsext_extended_attribute = fsext_extended_attribute | ||
|
||
@property | ||
def name(self): | ||
"""str: name.""" | ||
return self._fsext_extended_attribute.name | ||
|
||
# TODO: add functions to get value data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters