Class: File::Stat
- Defined in:
- lib/extensions/mspec/mspec/pp.rb,
lib/framework/autocomplete/File.rb
Instance Method Summary collapse
- #<=>(req) ⇒ Object
- #atime ⇒ Object
- #blksize ⇒ Object
- #blockdev? ⇒ Boolean
- #blocks ⇒ Object
- #chardev? ⇒ Boolean
- #ctime ⇒ Object
- #dev ⇒ Object
- #dev_major ⇒ Object
- #dev_minor ⇒ Object
- #directory? ⇒ Boolean
- #executable? ⇒ Boolean
- #executable_real? ⇒ Boolean
- #file? ⇒ Boolean
- #ftype ⇒ Object
- #gid ⇒ Object
- #grpowned? ⇒ Boolean
- #ino ⇒ Object
- #inspect ⇒ Object
- #mode ⇒ Object
- #mtime ⇒ Object
- #nlink ⇒ Object
- #owned? ⇒ Boolean
- #pipe? ⇒ Boolean
- #pretty_print(q) ⇒ Object
- #rdev ⇒ Object
- #rdev_major ⇒ Object
- #rdev_minor ⇒ Object
- #readable? ⇒ Boolean
- #readable_real? ⇒ Boolean
- #setgid? ⇒ Boolean
- #setuid? ⇒ Boolean
- #size ⇒ Object
- #size? ⇒ Boolean
- #socket? ⇒ Boolean
- #sticky? ⇒ Boolean
- #symlink? ⇒ Boolean
- #uid ⇒ Object
- #world_readable? ⇒ Boolean
- #world_writable? ⇒ Boolean
- #writable? ⇒ Boolean
- #writable_real? ⇒ Boolean
- #zero? ⇒ Boolean
Instance Method Details
#<=>(req) ⇒ Object
20 21 |
# File 'lib/framework/autocomplete/File.rb', line 20 def <=>(req) end |
#atime ⇒ Object
50 51 |
# File 'lib/framework/autocomplete/File.rb', line 50 def atime end |
#blksize ⇒ Object
46 47 |
# File 'lib/framework/autocomplete/File.rb', line 46 def blksize end |
#blockdev? ⇒ Boolean
94 95 |
# File 'lib/framework/autocomplete/File.rb', line 94 def blockdev? end |
#blocks ⇒ Object
48 49 |
# File 'lib/framework/autocomplete/File.rb', line 48 def blocks end |
#chardev? ⇒ Boolean
96 97 |
# File 'lib/framework/autocomplete/File.rb', line 96 def chardev? end |
#ctime ⇒ Object
54 55 |
# File 'lib/framework/autocomplete/File.rb', line 54 def ctime end |
#dev ⇒ Object
22 23 |
# File 'lib/framework/autocomplete/File.rb', line 22 def dev end |
#dev_major ⇒ Object
24 25 |
# File 'lib/framework/autocomplete/File.rb', line 24 def dev_major end |
#dev_minor ⇒ Object
26 27 |
# File 'lib/framework/autocomplete/File.rb', line 26 def dev_minor end |
#directory? ⇒ Boolean
60 61 |
# File 'lib/framework/autocomplete/File.rb', line 60 def directory? end |
#executable? ⇒ Boolean
74 75 |
# File 'lib/framework/autocomplete/File.rb', line 74 def executable? end |
#executable_real? ⇒ Boolean
76 77 |
# File 'lib/framework/autocomplete/File.rb', line 76 def executable_real? end |
#file? ⇒ Boolean
78 79 |
# File 'lib/framework/autocomplete/File.rb', line 78 def file? end |
#ftype ⇒ Object
58 59 |
# File 'lib/framework/autocomplete/File.rb', line 58 def ftype end |
#gid ⇒ Object
36 37 |
# File 'lib/framework/autocomplete/File.rb', line 36 def gid end |
#grpowned? ⇒ Boolean
86 87 |
# File 'lib/framework/autocomplete/File.rb', line 86 def grpowned? end |
#ino ⇒ Object
28 29 |
# File 'lib/framework/autocomplete/File.rb', line 28 def ino end |
#inspect ⇒ Object
56 57 |
# File 'lib/framework/autocomplete/File.rb', line 56 def inspect end |
#mode ⇒ Object
30 31 |
# File 'lib/framework/autocomplete/File.rb', line 30 def mode end |
#mtime ⇒ Object
52 53 |
# File 'lib/framework/autocomplete/File.rb', line 52 def mtime end |
#nlink ⇒ Object
32 33 |
# File 'lib/framework/autocomplete/File.rb', line 32 def nlink end |
#owned? ⇒ Boolean
84 85 |
# File 'lib/framework/autocomplete/File.rb', line 84 def owned? end |
#pipe? ⇒ Boolean
88 89 |
# File 'lib/framework/autocomplete/File.rb', line 88 def pipe? end |
#pretty_print(q) ⇒ Object
770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 |
# File 'lib/extensions/mspec/mspec/pp.rb', line 770 def pretty_print(q) require 'etc.so' q.object_group(self) { q.breakable q.text sprintf("dev=0x%x", self.dev); q.comma_breakable q.text "ino="; q.pp self.ino; q.comma_breakable q.group { m = self.mode q.text sprintf("mode=0%o", m) q.breakable q.text sprintf("(%s %c%c%c%c%c%c%c%c%c)", self.ftype, (m & 0400 == 0 ? ?- : ?r), (m & 0200 == 0 ? ?- : ?w), (m & 0100 == 0 ? (m & 04000 == 0 ? ?- : ?S) : (m & 04000 == 0 ? ?x : ?s)), (m & 0040 == 0 ? ?- : ?r), (m & 0020 == 0 ? ?- : ?w), (m & 0010 == 0 ? (m & 02000 == 0 ? ?- : ?S) : (m & 02000 == 0 ? ?x : ?s)), (m & 0004 == 0 ? ?- : ?r), (m & 0002 == 0 ? ?- : ?w), (m & 0001 == 0 ? (m & 01000 == 0 ? ?- : ?T) : (m & 01000 == 0 ? ?x : ?t))) } q.comma_breakable q.text "nlink="; q.pp self.nlink; q.comma_breakable q.group { q.text "uid="; q.pp self.uid begin pw = Etc.getpwuid(self.uid) rescue ArgumentError end if pw q.breakable; q.text "(#{pw.name})" end } q.comma_breakable q.group { q.text "gid="; q.pp self.gid begin gr = Etc.getgrgid(self.gid) rescue ArgumentError end if gr q.breakable; q.text "(#{gr.name})" end } q.comma_breakable q.group { q.text sprintf("rdev=0x%x", self.rdev) q.breakable q.text sprintf('(%d, %d)', self.rdev_major, self.rdev_minor) } q.comma_breakable q.text "size="; q.pp self.size; q.comma_breakable q.text "blksize="; q.pp self.blksize; q.comma_breakable q.text "blocks="; q.pp self.blocks; q.comma_breakable q.group { t = self.atime q.text "atime="; q.pp t q.breakable; q.text "(#{t.tv_sec})" } q.comma_breakable q.group { t = self.mtime q.text "mtime="; q.pp t q.breakable; q.text "(#{t.tv_sec})" } q.comma_breakable q.group { t = self.ctime q.text "ctime="; q.pp t q.breakable; q.text "(#{t.tv_sec})" } } end |
#rdev ⇒ Object
38 39 |
# File 'lib/framework/autocomplete/File.rb', line 38 def rdev end |
#rdev_major ⇒ Object
40 41 |
# File 'lib/framework/autocomplete/File.rb', line 40 def rdev_major end |
#rdev_minor ⇒ Object
42 43 |
# File 'lib/framework/autocomplete/File.rb', line 42 def rdev_minor end |
#readable? ⇒ Boolean
62 63 |
# File 'lib/framework/autocomplete/File.rb', line 62 def readable? end |
#readable_real? ⇒ Boolean
64 65 |
# File 'lib/framework/autocomplete/File.rb', line 64 def readable_real? end |
#setgid? ⇒ Boolean
100 101 |
# File 'lib/framework/autocomplete/File.rb', line 100 def setgid? end |
#setuid? ⇒ Boolean
98 99 |
# File 'lib/framework/autocomplete/File.rb', line 98 def setuid? end |
#size ⇒ Object
44 45 |
# File 'lib/framework/autocomplete/File.rb', line 44 def size end |
#size? ⇒ Boolean
82 83 |
# File 'lib/framework/autocomplete/File.rb', line 82 def size? end |
#socket? ⇒ Boolean
92 93 |
# File 'lib/framework/autocomplete/File.rb', line 92 def socket? end |
#sticky? ⇒ Boolean
102 103 |
# File 'lib/framework/autocomplete/File.rb', line 102 def sticky? end |
#symlink? ⇒ Boolean
90 91 |
# File 'lib/framework/autocomplete/File.rb', line 90 def symlink? end |
#uid ⇒ Object
34 35 |
# File 'lib/framework/autocomplete/File.rb', line 34 def uid end |
#world_readable? ⇒ Boolean
66 67 |
# File 'lib/framework/autocomplete/File.rb', line 66 def world_readable? end |
#world_writable? ⇒ Boolean
72 73 |
# File 'lib/framework/autocomplete/File.rb', line 72 def world_writable? end |
#writable? ⇒ Boolean
68 69 |
# File 'lib/framework/autocomplete/File.rb', line 68 def writable? end |
#writable_real? ⇒ Boolean
70 71 |
# File 'lib/framework/autocomplete/File.rb', line 70 def writable_real? end |
#zero? ⇒ Boolean
80 81 |
# File 'lib/framework/autocomplete/File.rb', line 80 def zero? end |