Class: File::Stat
- Defined in:
- lib/framework/pp.rb,
lib/framework/autocomplete/File.rb
Overview
:nodoc:
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
:nodoc:.
- #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
:nodoc:
423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 |
# File 'lib/framework/pp.rb', line 423 def pretty_print(q) # :nodoc: 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) if self.rdev_major && self.rdev_minor q.breakable q.text sprintf('(%d, %d)', self.rdev_major, self.rdev_minor) end } 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 |