Skip to content

Commit

Permalink
Merge pull request #1 from cmallwitz/master
Browse files Browse the repository at this point in the history
Added entry.mode and entry.strmode
  • Loading branch information
Changaco committed Feb 6, 2015
2 parents 8f588d9 + 7c8e8f2 commit a6e34c1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions libarchive/entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,11 @@ def pathname(self, value):
def size(self):
if ffi.entry_size_is_set(self._entry_p):
return ffi.entry_size(self._entry_p)

@property
def mode(self):
return ffi.entry_mode(self._entry_p)

@property
def strmode(self):
return ffi.entry_strmode(self._entry_p)
2 changes: 2 additions & 0 deletions libarchive/ffi.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ def ffi(name, argtypes, restype, errcheck=None):
ffi('entry_sourcepath', [c_archive_entry_p], c_char_p)
ffi('entry_size', [c_archive_entry_p], c_longlong)
ffi('entry_size_is_set', [c_archive_entry_p], c_int)
ffi('entry_mode', [c_archive_entry_p], c_int)
ffi('entry_strmode', [c_archive_entry_p], c_char_p)

ffi('entry_update_pathname_utf8', [c_archive_entry_p, c_char_p], None)

Expand Down

0 comments on commit a6e34c1

Please sign in to comment.