In Files

Parent

Files

Class/Module Index [+]

Quicksearch

Archive::Entry

Public Instance Methods

atime() click to toggle source
static VALUE rb_libarchive_entry_atime(VALUE self) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  return LONG2TIME((long) archive_entry_atime(p->ae));
}
atime=(p1) click to toggle source
static VALUE rb_libarchive_entry_set_atime(VALUE self, VALUE v_time) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  Check_Class(v_time, rb_cTime);
  archive_entry_set_atime(p->ae, TIME2LONG(v_time), 0);
  return Qnil;
}
atime_is_set?() click to toggle source
static VALUE rb_libarchive_entry_atime_is_set(VALUE self) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  return archive_entry_atime_is_set(p->ae) ? Qtrue : Qfalse;
}
atime_nsec() click to toggle source
static VALUE rb_libarchive_entry_atime_nsec(VALUE self) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  return LONG2NUM(archive_entry_atime_nsec(p->ae));
}
birthtime() click to toggle source
static VALUE rb_libarchive_entry_birthtime(VALUE self) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  return LONG2TIME((long) archive_entry_birthtime(p->ae));
}
birthtime_is_set?() click to toggle source
static VALUE rb_libarchive_entry_birthtime_is_set(VALUE self) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  return archive_entry_birthtime_is_set(p->ae) ? Qtrue : Qfalse;
}
birthtime_nsec() click to toggle source
static VALUE rb_libarchive_entry_birthtime_nsec(VALUE self) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  return LONG2NUM(archive_entry_birthtime_nsec(p->ae));
}
birthtimee=(p1) click to toggle source
static VALUE rb_libarchive_entry_set_birthtime(VALUE self, VALUE v_time) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  Check_Class(v_time, rb_cTime);
  archive_entry_set_birthtime(p->ae, TIME2LONG(v_time), 0);
  return Qnil;
}
block_special?() click to toggle source
static VALUE rb_libarchive_entry_is_block_special(VALUE self) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  return S_ISBLK(archive_entry_filetype(p->ae)) ? Qtrue : Qfalse;
}
character_special?() click to toggle source
static VALUE rb_libarchive_entry_is_character_special(VALUE self) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  return S_ISCHR(archive_entry_filetype(p->ae)) ? Qtrue : Qfalse;
}
close() click to toggle source
VALUE rb_libarchive_entry_close(VALUE self) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);

  if (!p->must_close) {
    rb_raise(rb_eArchiveError, "Close entry failed: It is not necessary to close");
  }

  archive_entry_free(p->ae);
  p->ae = NULL;
  return Qnil;
}
copy_fflags_text(p1) click to toggle source
static VALUE rb_libarchive_entry_copy_fflags_text(VALUE self, VALUE v_fflags_text) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  Check_Type(v_fflags_text, T_STRING);
  archive_entry_copy_fflags_text(p->ae, RSTRING_PTR(v_fflags_text));
  return Qnil;
}
copy_gname(p1) click to toggle source
static VALUE rb_libarchive_entry_copy_gname(VALUE self, VALUE v_gname) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  Check_Type(v_gname, T_STRING);
  archive_entry_copy_gname(p->ae, RSTRING_PTR(v_gname));
  return Qnil;
}
copy_lstat(p1) click to toggle source
static VALUE rb_libarchive_entry_copy_lstat(VALUE self, VALUE v_filename) {
  struct rb_libarchive_entry_container *p;
  const char *filename;
  struct stat s;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  Check_Type(v_filename, T_STRING);
  filename = RSTRING_PTR(v_filename);

  if (lstat(filename, &s) != 0) {
    rb_raise(rb_eArchiveError, "Copy stat failed: %", strerror(errno));
  }

  archive_entry_copy_stat(p->ae, &s);
  return Qnil;
}
copy_pathname(p1) click to toggle source
static VALUE rb_libarchive_entry_copy_pathname(VALUE self, VALUE v_filename) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  Check_Type(v_filename, T_STRING);
  archive_entry_copy_pathname(p->ae, RSTRING_PTR(v_filename));
  return Qnil;
}
copy_sourcepath(p1) click to toggle source
static VALUE rb_libarchive_entry_copy_sourcepath(VALUE self, VALUE v_sourcepath) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  Check_Type(v_sourcepath, T_STRING);
  archive_entry_copy_sourcepath(p->ae, RSTRING_PTR(v_sourcepath));
  return Qnil;
}
copy_stat(p1) click to toggle source
static VALUE rb_libarchive_entry_copy_stat(VALUE self, VALUE v_filename) {
  struct rb_libarchive_entry_container *p;
  const char *filename;
  struct stat s;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  Check_Type(v_filename, T_STRING);
  filename = RSTRING_PTR(v_filename);

  if (stat(filename, &s) != 0) {
    rb_raise(rb_eArchiveError, "Copy stat failed: %", strerror(errno));
  }

  archive_entry_copy_stat(p->ae, &s);
  return Qnil;
}
copy_uname(p1) click to toggle source
static VALUE rb_libarchive_entry_copy_uname(VALUE self, VALUE v_uname) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  Check_Type(v_uname, T_STRING);
  archive_entry_copy_uname(p->ae, RSTRING_PTR(v_uname));
  return Qnil;
}
ctime() click to toggle source
static VALUE rb_libarchive_entry_ctime(VALUE self) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  return LONG2TIME((long) archive_entry_ctime(p->ae));
}
ctime=(p1) click to toggle source
static VALUE rb_libarchive_entry_set_ctime(VALUE self, VALUE v_time) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  Check_Class(v_time, rb_cTime);
  archive_entry_set_ctime(p->ae, TIME2LONG(v_time), 0);
  return Qnil;
}
ctime_is_set?() click to toggle source
static VALUE rb_libarchive_entry_ctime_is_set(VALUE self) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  return archive_entry_ctime_is_set(p->ae) ? Qtrue : Qfalse;
}
ctime_nsec() click to toggle source
static VALUE rb_libarchive_entry_ctime_nsec(VALUE self) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  return LONG2NUM(archive_entry_ctime_nsec(p->ae));
}
dev() click to toggle source
static VALUE rb_libarchive_entry_dev(VALUE self) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  return LONG2NUM(archive_entry_dev(p->ae));
}
dev=(p1) click to toggle source
static VALUE rb_libarchive_entry_set_dev(VALUE self, VALUE v_dev) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  Check_Type(v_dev, T_FIXNUM);
  archive_entry_set_dev(p->ae, NUM2LONG(v_dev));
  return Qnil;
}
devmajor() click to toggle source
static VALUE rb_libarchive_entry_devmajor(VALUE self) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  return LONG2NUM(archive_entry_devmajor(p->ae));
}
devmajor=(p1) click to toggle source
static VALUE rb_libarchive_entry_set_devmajor(VALUE self, VALUE v_dev) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  Check_Type(v_dev, T_FIXNUM);
  archive_entry_set_devmajor(p->ae, NUM2LONG(v_dev));
  return Qnil;
}
devminor() click to toggle source
static VALUE rb_libarchive_entry_devminor(VALUE self) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  return LONG2NUM(archive_entry_devminor(p->ae));
}
devminor=(p1) click to toggle source
static VALUE rb_libarchive_entry_set_devminor(VALUE self, VALUE v_dev) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  Check_Type(v_dev, T_FIXNUM);
  archive_entry_set_devminor(p->ae, NUM2LONG(v_dev));
  return Qnil;
}
directory?() click to toggle source
static VALUE rb_libarchive_entry_is_directory(VALUE self) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  return S_ISDIR(archive_entry_filetype(p->ae)) ? Qtrue : Qfalse;
}
fflags() click to toggle source
static VALUE rb_libarchive_entry_fflags(VALUE self) {
  struct rb_libarchive_entry_container *p;
  long set, clear;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  archive_entry_fflags(p->ae, &set, &clear);
  return rb_ary_new3(2, LONG2NUM(set), LONG2NUM(clear));
}
fflags_text() click to toggle source
static VALUE rb_libarchive_entry_fflags_text(VALUE self) {
  struct rb_libarchive_entry_container *p;
  const char *fflags_text;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  fflags_text = archive_entry_fflags_text(p->ae);
  return (fflags_text != NULL) ? rb_str_new2(fflags_text) : Qnil;
}
fifo?() click to toggle source
static VALUE rb_libarchive_entry_is_fifo(VALUE self) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  return S_ISFIFO(archive_entry_filetype(p->ae)) ? Qtrue : Qfalse;
}
filetype() click to toggle source
static VALUE rb_libarchive_entry_filetype(VALUE self) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  return INT2NUM(archive_entry_filetype(p->ae));
}
filetype=(p1) click to toggle source
static VALUE rb_libarchive_entry_set_filetype(VALUE self, VALUE v_type) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  Check_Type(v_type, T_FIXNUM);
  archive_entry_set_filetype(p->ae, NUM2LONG(v_type));
  return Qnil;
}
gid() click to toggle source
static VALUE rb_libarchive_entry_gid(VALUE self) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  return LONG2NUM(archive_entry_gid(p->ae));
}
gid=(p1) click to toggle source
static VALUE rb_libarchive_entry_set_gid(VALUE self, VALUE v_gid) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  Check_Type(v_gid, T_FIXNUM);
  archive_entry_set_gid(p->ae, NUM2INT(v_gid));
  return Qnil;
}
gname() click to toggle source
static VALUE rb_libarchive_entry_gname(VALUE self) {
  struct rb_libarchive_entry_container *p;
  const char *gname;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  gname = archive_entry_gname(p->ae);
  return (gname != NULL) ? rb_str_new2(gname) : Qnil;
}
gname=(p1) click to toggle source
static VALUE rb_libarchive_entry_set_gname(VALUE self, VALUE v_gname) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  Check_Type(v_gname, T_STRING);
  archive_entry_set_gname(p->ae, RSTRING_PTR(v_gname));
  return Qnil;
}
ino() click to toggle source
static VALUE rb_libarchive_entry_ino(VALUE self) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  return LONG2NUM(archive_entry_ino(p->ae));
}
ino=(p1) click to toggle source
static VALUE rb_libarchive_entry_set_ino(VALUE self, VALUE v_ino) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  Check_Type(v_ino, T_FIXNUM);
  archive_entry_set_ino(p->ae, (unsigned long) NUM2LONG(v_ino));
  return Qnil;
}
mode() click to toggle source
static VALUE rb_libarchive_entry_mode(VALUE self) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  return LONG2NUM(archive_entry_mode(p->ae));
}
mode=(p1) click to toggle source
static VALUE rb_libarchive_entry_set_mode(VALUE self, VALUE v_mode) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  Check_Type(v_mode, T_FIXNUM);
  archive_entry_set_mode(p->ae, NUM2INT(v_mode));
  return Qnil;
}
mtime() click to toggle source
static VALUE rb_libarchive_entry_mtime(VALUE self) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  return LONG2TIME((long) archive_entry_mtime(p->ae));
}
mtime=(p1) click to toggle source
static VALUE rb_libarchive_entry_set_mtime(VALUE self, VALUE v_time) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  Check_Class(v_time, rb_cTime);
  archive_entry_set_mtime(p->ae, TIME2LONG(v_time), 0);
  return Qnil;
}
mtime_is_set?() click to toggle source
static VALUE rb_libarchive_entry_mtime_is_set(VALUE self) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  return archive_entry_mtime_is_set(p->ae) ? Qtrue : Qfalse;
}
mtime_nsec() click to toggle source
static VALUE rb_libarchive_entry_mtime_nsec(VALUE self) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  return LONG2NUM(archive_entry_mtime_nsec(p->ae));
}
pathname() click to toggle source
static VALUE rb_libarchive_entry_pathname(VALUE self) {
  struct rb_libarchive_entry_container *p;
  const char *pathname;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  pathname = archive_entry_pathname(p->ae);
  return (pathname != NULL) ? rb_str_new2(pathname) : Qnil;
}
pathname=(p1) click to toggle source
static VALUE rb_libarchive_entry_set_pathname(VALUE self, VALUE v_filename) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  Check_Type(v_filename, T_STRING);
  archive_entry_set_pathname(p->ae, RSTRING_PTR(v_filename));
  return Qnil;
}
perm=(p1) click to toggle source
static VALUE rb_libarchive_entry_set_perm(VALUE self, VALUE v_perm) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  Check_Type(v_perm, T_FIXNUM);
  archive_entry_set_perm(p->ae, NUM2INT(v_perm));
  return Qnil;
}
rdev() click to toggle source
static VALUE rb_libarchive_entry_rdev(VALUE self) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  return LONG2NUM(archive_entry_rdev(p->ae));
}
rdev=(p1) click to toggle source
static VALUE rb_libarchive_entry_set_rdev(VALUE self, VALUE v_rdev) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  Check_Type(v_rdev, T_FIXNUM);
  archive_entry_set_rdev(p->ae, NUM2LONG(v_rdev));
  return Qnil;
}
rdevmajor() click to toggle source
static VALUE rb_libarchive_entry_rdevmajor(VALUE self) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  return LONG2NUM(archive_entry_rdevmajor(p->ae));
}
rdevmajor=(p1) click to toggle source
static VALUE rb_libarchive_entry_set_rdevmajor(VALUE self, VALUE v_rdev) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  Check_Type(v_rdev, T_FIXNUM);
  archive_entry_set_rdevmajor(p->ae, NUM2LONG(v_rdev));
  return Qnil;
}
rdevminor() click to toggle source
static VALUE rb_libarchive_entry_rdevminor(VALUE self) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  return LONG2NUM(archive_entry_rdevminor(p->ae));
}
rdevminor=(p1) click to toggle source
static VALUE rb_libarchive_entry_set_rdevminor(VALUE self, VALUE v_rdev) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  Check_Type(v_rdev, T_FIXNUM);
  archive_entry_set_rdevminor(p->ae, NUM2LONG(v_rdev));
  return Qnil;
}
regular?() click to toggle source
static VALUE rb_libarchive_entry_is_regular(VALUE self) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  return S_ISREG(archive_entry_filetype(p->ae)) ? Qtrue : Qfalse;
}
set_atime(p1, p2) click to toggle source
static VALUE rb_libarchive_entry_set_atime2(VALUE self, VALUE v_time, VALUE v_ns) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  Check_Class(v_time, rb_cTime);
  Check_Type(v_ns, T_FIXNUM);
  archive_entry_set_atime(p->ae, TIME2LONG(v_time), NUM2LONG(v_ns));
  return Qnil;
}
set_birthtime(p1, p2) click to toggle source
static VALUE rb_libarchive_entry_set_birthtime2(VALUE self, VALUE v_time, VALUE v_ns) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  Check_Class(v_time, rb_cTime);
  Check_Type(v_ns, T_FIXNUM);
  archive_entry_set_birthtime(p->ae, TIME2LONG(v_time), NUM2LONG(v_ns));
  return Qnil;
}
set_ctime(p1, p2) click to toggle source
static VALUE rb_libarchive_entry_set_ctime2(VALUE self, VALUE v_time, VALUE v_ns) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  Check_Class(v_time, rb_cTime);
  Check_Type(v_ns, T_FIXNUM);
  archive_entry_set_ctime(p->ae, TIME2LONG(v_time), NUM2LONG(v_ns));
  return Qnil;
}
set_fflags(p1, p2) click to toggle source
static VALUE rb_libarchive_entry_set_fflags(VALUE self, VALUE v_set, VALUE v_clear) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  Check_Type(v_set, T_FIXNUM);
  Check_Type(v_clear, T_FIXNUM);
  archive_entry_set_fflags(p->ae, (unsigned long) NUM2LONG(v_set), (unsigned long) NUM2LONG(v_clear));
  return Qnil;
}
set_mtime(p1, p2) click to toggle source
static VALUE rb_libarchive_entry_set_mtime2(VALUE self, VALUE v_time, VALUE v_ns) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  Check_Class(v_time, rb_cTime);
  Check_Type(v_ns, T_FIXNUM);
  archive_entry_set_mtime(p->ae, TIME2LONG(v_time), NUM2LONG(v_ns));
  return Qnil;
}
size() click to toggle source
static VALUE rb_libarchive_entry_size(VALUE self) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  return LONG2NUM(archive_entry_size(p->ae));
}
size=(p1) click to toggle source
static VALUE rb_libarchive_entry_set_size(VALUE self, VALUE v_size) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  Check_Type(v_size, T_FIXNUM);
  archive_entry_set_size(p->ae, NUM2LONG(v_size));
  return Qnil;
}
size_is_set?() click to toggle source
static VALUE rb_libarchive_entry_size_is_set(VALUE self) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  return archive_entry_size_is_set(p->ae) ? Qtrue : Qfalse;
}
socket?() click to toggle source
static VALUE rb_libarchive_entry_is_socket(VALUE self) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  return S_ISSOCK(archive_entry_filetype(p->ae)) ? Qtrue : Qfalse;
}
sourcepath() click to toggle source
static VALUE rb_libarchive_entry_sourcepath(VALUE self) {
  struct rb_libarchive_entry_container *p;
  const char *sourcepath;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  sourcepath = archive_entry_sourcepath(p->ae);
  return (sourcepath != NULL) ? rb_str_new2(sourcepath) : Qnil;
}
strmode() click to toggle source
static VALUE rb_libarchive_entry_strmode(VALUE self) {
  struct rb_libarchive_entry_container *p;
  const char *strmode;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  strmode = archive_entry_strmode(p->ae);
  return (strmode != NULL) ? rb_str_new2(strmode) : Qnil;
}
uid() click to toggle source
static VALUE rb_libarchive_entry_uid(VALUE self) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  return LONG2NUM(archive_entry_uid(p->ae));
}
uid=(p1) click to toggle source
static VALUE rb_libarchive_entry_set_uid(VALUE self, VALUE v_uid) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  Check_Type(v_uid, T_FIXNUM);
  archive_entry_set_uid(p->ae, NUM2INT(v_uid));
  return Qnil;
}
uname() click to toggle source
static VALUE rb_libarchive_entry_uname(VALUE self) {
  struct rb_libarchive_entry_container *p;
  const char *uname;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  uname = archive_entry_uname(p->ae);
  return (uname != NULL) ? rb_str_new2(uname) : Qnil;
}
uname=(p1) click to toggle source
static VALUE rb_libarchive_entry_set_uname(VALUE self, VALUE v_uname) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  Check_Type(v_uname, T_STRING);
  archive_entry_set_uname(p->ae, RSTRING_PTR(v_uname));
  return Qnil;
}
unset_atime() click to toggle source
static VALUE rb_libarchive_entry_unset_atime(VALUE self) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  archive_entry_unset_atime(p->ae);
  return Qnil;
}
unset_birthtime() click to toggle source
static VALUE rb_libarchive_entry_unset_birthtime(VALUE self) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  archive_entry_unset_birthtime(p->ae);
  return Qnil;
}
unset_ctime() click to toggle source
static VALUE rb_libarchive_entry_unset_ctime(VALUE self) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  archive_entry_unset_ctime(p->ae);
  return Qnil;
}
unset_mtime() click to toggle source
static VALUE rb_libarchive_entry_unset_mtime(VALUE self) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  archive_entry_unset_mtime(p->ae);
  return Qnil;
}
unset_size() click to toggle source
static VALUE rb_libarchive_entry_unset_size(VALUE self) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  archive_entry_unset_size(p->ae);
  return Qnil;
}
xattr_add_entry(p1, p2) click to toggle source
static VALUE rb_libarchive_entry_xattr_add_entry(VALUE self, VALUE v_name, VALUE v_value) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  Check_Type(v_name, T_STRING);
  Check_Type(v_value, T_STRING);
  archive_entry_xattr_add_entry(p->ae, RSTRING_PTR(v_name), RSTRING_PTR(v_value), RSTRING_LEN(v_value));
  return Qnil;
}
xattr_clear() click to toggle source
static VALUE rb_libarchive_entry_xattr_clear(VALUE self) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  archive_entry_xattr_clear(p->ae);
  return Qnil;
}
xattr_count() click to toggle source
static VALUE rb_libarchive_entry_xattr_count(VALUE self) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  return INT2NUM(archive_entry_xattr_count(p->ae));
}
xattr_next() click to toggle source
static VALUE rb_libarchive_entry_xattr_next(VALUE self) {
  struct rb_libarchive_entry_container *p;
  const char *name;
  const void *value;
  size_t size;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);

  if (archive_entry_xattr_next(p->ae, &name, &value, &size) != ARCHIVE_OK) {
    return Qnil;
  } else {
    return rb_ary_new3(3, rb_str_new2(name), rb_str_new(value, size));
  }
}
xattr_reset() click to toggle source
static VALUE rb_libarchive_entry_xattr_reset(VALUE self) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  return INT2NUM(archive_entry_xattr_reset(p->ae));
}

[Validate]

Generated with the Darkfish Rdoc Generator 2.