Class: Archive::Entry

Inherits:
Object
  • Object
show all
Defined in:
ext/libarchive-0.1.1/ext/libarchive_entry.c,
ext/libarchive-0.1.1/libarchive.c

Instance Method Summary collapse

Instance Method Details

#atimeObject



44
45
46
47
48
49
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 44

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=(v_time) ⇒ Object



400
401
402
403
404
405
406
407
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 400

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?Boolean

Returns:

  • (Boolean)


60
61
62
63
64
65
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 60

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_nsecObject



52
53
54
55
56
57
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 52

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));
}

#birthtimeObject



68
69
70
71
72
73
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 68

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?Boolean

Returns:

  • (Boolean)


84
85
86
87
88
89
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 84

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_nsecObject



76
77
78
79
80
81
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 76

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=(v_time) ⇒ Object



430
431
432
433
434
435
436
437
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 430

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?Boolean

Returns:

  • (Boolean)


164
165
166
167
168
169
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 164

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?Boolean

Returns:

  • (Boolean)


156
157
158
159
160
161
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 156

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;
}

#closeObject



19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 19

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(v_fflags_text) ⇒ Object



541
542
543
544
545
546
547
548
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 541

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(v_gname) ⇒ Object



571
572
573
574
575
576
577
578
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 571

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;
}


591
592
593
594
595
596
597
598
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 591

static VALUE rb_libarchive_entry_copy_hardlink(VALUE self, VALUE v_hardlink) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  Check_Type(v_hardlink, T_STRING);
  archive_entry_copy_hardlink(p->ae, RSTRING_PTR(v_hardlink));
  return Qnil;
}


621
622
623
624
625
626
627
628
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 621

static VALUE rb_libarchive_entry_copy_link(VALUE self, VALUE v_link) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  Check_Type(v_link, T_STRING);
  archive_entry_copy_link(p->ae, RSTRING_PTR(v_link));
  return Qnil;
}

#copy_lstat(v_filename) ⇒ Object



840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 840

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(v_filename) ⇒ Object



691
692
693
694
695
696
697
698
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 691

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(v_sourcepath) ⇒ Object



761
762
763
764
765
766
767
768
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 761

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(v_filename) ⇒ Object



822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 822

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;
}


782
783
784
785
786
787
788
789
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 782

static VALUE rb_libarchive_entry_copy_symlink(VALUE self, VALUE v_symlink) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  Check_Type(v_symlink, T_STRING);
  archive_entry_copy_symlink(p->ae, RSTRING_PTR(v_symlink));
  return Qnil;
}

#copy_uname(v_uname) ⇒ Object



812
813
814
815
816
817
818
819
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 812

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;
}

#ctimeObject



92
93
94
95
96
97
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 92

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=(v_time) ⇒ Object



460
461
462
463
464
465
466
467
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 460

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?Boolean

Returns:

  • (Boolean)


108
109
110
111
112
113
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 108

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_nsecObject



100
101
102
103
104
105
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 100

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));
}

#devObject



116
117
118
119
120
121
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 116

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=(v_dev) ⇒ Object



490
491
492
493
494
495
496
497
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 490

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;
}

#devmajorObject



124
125
126
127
128
129
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 124

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=(v_dev) ⇒ Object



500
501
502
503
504
505
506
507
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 500

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;
}

#devminorObject



132
133
134
135
136
137
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 132

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=(v_dev) ⇒ Object



510
511
512
513
514
515
516
517
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 510

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?Boolean

Returns:

  • (Boolean)


148
149
150
151
152
153
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 148

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;
}

#fflagsObject



204
205
206
207
208
209
210
211
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 204

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_textObject



214
215
216
217
218
219
220
221
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 214

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?Boolean

Returns:

  • (Boolean)


196
197
198
199
200
201
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 196

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;
}

#filetypeObject



140
141
142
143
144
145
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 140

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=(v_type) ⇒ Object



520
521
522
523
524
525
526
527
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 520

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;
}

#gidObject



224
225
226
227
228
229
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 224

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=(v_gid) ⇒ Object



551
552
553
554
555
556
557
558
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 551

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, NUM2LONG(v_gid));
  return Qnil;
}

#gnameObject



232
233
234
235
236
237
238
239
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 232

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=(v_gname) ⇒ Object



561
562
563
564
565
566
567
568
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 561

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;
}


242
243
244
245
246
247
248
249
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 242

static VALUE rb_libarchive_entry_hardlink(VALUE self) {
  struct rb_libarchive_entry_container *p;
  const char *hardlink;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  hardlink = archive_entry_hardlink(p->ae);
  return (hardlink != NULL) ? rb_str_new2(hardlink) : Qnil;
}

#hardlink=(v_hardlink) ⇒ Object



581
582
583
584
585
586
587
588
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 581

static VALUE rb_libarchive_entry_set_hardlink(VALUE self, VALUE v_hardlink) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  Check_Type(v_hardlink, T_STRING);
  archive_entry_set_hardlink(p->ae, RSTRING_PTR(v_hardlink));
  return Qnil;
}

#inoObject



252
253
254
255
256
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 252

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=(v_ino) ⇒ Object



601
602
603
604
605
606
607
608
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 601

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;
}

#link=(v_link) ⇒ Object



611
612
613
614
615
616
617
618
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 611

static VALUE rb_libarchive_entry_set_link(VALUE self, VALUE v_link) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  Check_Type(v_link, T_STRING);
  archive_entry_set_link(p->ae, RSTRING_PTR(v_link));
  return Qnil;
}

#modeObject



259
260
261
262
263
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 259

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=(v_mode) ⇒ Object



631
632
633
634
635
636
637
638
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 631

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_STRING);
  archive_entry_set_mode(p->ae, NUM2INT(v_mode));
  return Qnil;
}

#mtimeObject



266
267
268
269
270
271
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 266

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=(v_time) ⇒ Object



641
642
643
644
645
646
647
648
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 641

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?Boolean

Returns:

  • (Boolean)


282
283
284
285
286
287
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 282

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_nsecObject



274
275
276
277
278
279
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 274

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));
}


290
291
292
293
294
295
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 290

static VALUE rb_libarchive_entry_nlink(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_nlink(p->ae));
}

#nlink=(v_nlink) ⇒ Object



671
672
673
674
675
676
677
678
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 671

static VALUE rb_libarchive_entry_set_nlink(VALUE self, VALUE v_nlink) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  Check_Type(v_nlink, T_FIXNUM);
  archive_entry_set_nlink(p->ae, NUM2LONG(v_nlink));
  return Qnil;
}

#pathnameObject



298
299
300
301
302
303
304
305
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 298

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=(v_filename) ⇒ Object



681
682
683
684
685
686
687
688
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 681

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=(v_perm) ⇒ Object



701
702
703
704
705
706
707
708
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 701

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_STRING);
  archive_entry_set_perm(p->ae, NUM2INT(v_perm));
  return Qnil;
}

#rdevObject



308
309
310
311
312
313
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 308

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=(v_rdev) ⇒ Object



711
712
713
714
715
716
717
718
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 711

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;
}

#rdevmajorObject



316
317
318
319
320
321
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 316

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=(v_rdev) ⇒ Object



721
722
723
724
725
726
727
728
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 721

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;
}

#rdevminorObject



324
325
326
327
328
329
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 324

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=(v_rdev) ⇒ Object



731
732
733
734
735
736
737
738
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 731

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?Boolean

Returns:

  • (Boolean)


172
173
174
175
176
177
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 172

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(v_time, v_ns) ⇒ Object



410
411
412
413
414
415
416
417
418
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 410

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(v_time, v_ns) ⇒ Object



440
441
442
443
444
445
446
447
448
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 440

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(v_time, v_ns) ⇒ Object



470
471
472
473
474
475
476
477
478
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 470

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(v_set, v_clear) ⇒ Object



530
531
532
533
534
535
536
537
538
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 530

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(v_time, v_ns) ⇒ Object



651
652
653
654
655
656
657
658
659
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 651

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;
}

#sizeObject



344
345
346
347
348
349
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 344

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 LL2NUM(archive_entry_size(p->ae));
}

#size=(v_size) ⇒ Object



741
742
743
744
745
746
747
748
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 741

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, NUM2LL(v_size));
  return Qnil;
}

#size_is_set?Boolean

Returns:

  • (Boolean)


352
353
354
355
356
357
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 352

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?Boolean

Returns:

  • (Boolean)


188
189
190
191
192
193
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 188

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;
}

#sourcepathObject



333
334
335
336
337
338
339
340
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 333

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;
}

#strmodeObject



361
362
363
364
365
366
367
368
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 361

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;
}

#symbolic_link?Boolean

Returns:

  • (Boolean)


180
181
182
183
184
185
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 180

static VALUE rb_libarchive_entry_is_symbolic_link(VALUE self) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  return S_ISLNK(archive_entry_filetype(p->ae)) ? Qtrue : Qfalse;
}


372
373
374
375
376
377
378
379
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 372

static VALUE rb_libarchive_entry_symlink(VALUE self) {
  struct rb_libarchive_entry_container *p;
  const char *symlink;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  symlink = archive_entry_symlink(p->ae);
  return (symlink != NULL) ? rb_str_new2(symlink) : Qnil;
}

#symlink=(v_symlink) ⇒ Object



772
773
774
775
776
777
778
779
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 772

static VALUE rb_libarchive_entry_set_symlink(VALUE self, VALUE v_symlink) {
  struct rb_libarchive_entry_container *p;
  Data_Get_Struct(self, struct rb_libarchive_entry_container, p);
  Check_Entry(p);
  Check_Type(v_symlink, T_STRING);
  archive_entry_set_symlink(p->ae, RSTRING_PTR(v_symlink));
  return Qnil;
}

#uidObject



382
383
384
385
386
387
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 382

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=(v_uid) ⇒ Object



792
793
794
795
796
797
798
799
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 792

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, NUM2LONG(v_uid));
  return Qnil;
}

#unameObject



390
391
392
393
394
395
396
397
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 390

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=(v_uname) ⇒ Object



802
803
804
805
806
807
808
809
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 802

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_atimeObject



421
422
423
424
425
426
427
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 421

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_birthtimeObject



451
452
453
454
455
456
457
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 451

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_ctimeObject



481
482
483
484
485
486
487
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 481

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_mtimeObject



662
663
664
665
666
667
668
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 662

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_sizeObject



751
752
753
754
755
756
757
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 751

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(v_name, v_value) ⇒ Object



867
868
869
870
871
872
873
874
875
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 867

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_clearObject



858
859
860
861
862
863
864
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 858

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_countObject



878
879
880
881
882
883
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 878

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_nextObject



894
895
896
897
898
899
900
901
902
903
904
905
906
907
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 894

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_resetObject



886
887
888
889
890
891
# File 'ext/libarchive-0.1.1/ext/libarchive_entry.c', line 886

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));
}