Class: File::Stat

Inherits:
Object show all
Defined in:
lib/framework/pp.rb,
lib/framework/autocomplete/File.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#<=>(req) ⇒ Object



20
21
# File 'lib/framework/autocomplete/File.rb', line 20

def <=>(req)
end

#atimeObject



50
51
# File 'lib/framework/autocomplete/File.rb', line 50

def atime
end

#blksizeObject



46
47
# File 'lib/framework/autocomplete/File.rb', line 46

def blksize
end

#blockdev?Boolean

Returns:

  • (Boolean)


94
95
# File 'lib/framework/autocomplete/File.rb', line 94

def blockdev?
end

#blocksObject



48
49
# File 'lib/framework/autocomplete/File.rb', line 48

def blocks
end

#chardev?Boolean

Returns:

  • (Boolean)


96
97
# File 'lib/framework/autocomplete/File.rb', line 96

def chardev?
end

#ctimeObject



54
55
# File 'lib/framework/autocomplete/File.rb', line 54

def ctime
end

#devObject



22
23
# File 'lib/framework/autocomplete/File.rb', line 22

def dev
end

#dev_majorObject



24
25
# File 'lib/framework/autocomplete/File.rb', line 24

def dev_major
end

#dev_minorObject



26
27
# File 'lib/framework/autocomplete/File.rb', line 26

def dev_minor
end

#directory?Boolean

Returns:

  • (Boolean)


60
61
# File 'lib/framework/autocomplete/File.rb', line 60

def directory?
end

#executable?Boolean

Returns:

  • (Boolean)


74
75
# File 'lib/framework/autocomplete/File.rb', line 74

def executable?
end

#executable_real?Boolean

Returns:

  • (Boolean)


76
77
# File 'lib/framework/autocomplete/File.rb', line 76

def executable_real?
end

#file?Boolean

Returns:

  • (Boolean)


78
79
# File 'lib/framework/autocomplete/File.rb', line 78

def file?
end

#ftypeObject



58
59
# File 'lib/framework/autocomplete/File.rb', line 58

def ftype
end

#gidObject



36
37
# File 'lib/framework/autocomplete/File.rb', line 36

def gid
end

#grpowned?Boolean

Returns:

  • (Boolean)


86
87
# File 'lib/framework/autocomplete/File.rb', line 86

def grpowned?
end

#inoObject



28
29
# File 'lib/framework/autocomplete/File.rb', line 28

def ino
end

#inspectObject



56
57
# File 'lib/framework/autocomplete/File.rb', line 56

def inspect
end

#modeObject



30
31
# File 'lib/framework/autocomplete/File.rb', line 30

def mode
end

#mtimeObject



52
53
# File 'lib/framework/autocomplete/File.rb', line 52

def mtime
end


32
33
# File 'lib/framework/autocomplete/File.rb', line 32

def nlink
end

#owned?Boolean

Returns:

  • (Boolean)


84
85
# File 'lib/framework/autocomplete/File.rb', line 84

def owned?
end

#pipe?Boolean

Returns:

  • (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

#rdevObject



38
39
# File 'lib/framework/autocomplete/File.rb', line 38

def rdev
end

#rdev_majorObject



40
41
# File 'lib/framework/autocomplete/File.rb', line 40

def rdev_major
end

#rdev_minorObject



42
43
# File 'lib/framework/autocomplete/File.rb', line 42

def rdev_minor
end

#readable?Boolean

Returns:

  • (Boolean)


62
63
# File 'lib/framework/autocomplete/File.rb', line 62

def readable?
end

#readable_real?Boolean

Returns:

  • (Boolean)


64
65
# File 'lib/framework/autocomplete/File.rb', line 64

def readable_real?
end

#setgid?Boolean

Returns:

  • (Boolean)


100
101
# File 'lib/framework/autocomplete/File.rb', line 100

def setgid?
end

#setuid?Boolean

Returns:

  • (Boolean)


98
99
# File 'lib/framework/autocomplete/File.rb', line 98

def setuid?
end

#sizeObject



44
45
# File 'lib/framework/autocomplete/File.rb', line 44

def size
end

#size?Boolean

Returns:

  • (Boolean)


82
83
# File 'lib/framework/autocomplete/File.rb', line 82

def size?
end

#socket?Boolean

Returns:

  • (Boolean)


92
93
# File 'lib/framework/autocomplete/File.rb', line 92

def socket?
end

#sticky?Boolean

Returns:

  • (Boolean)


102
103
# File 'lib/framework/autocomplete/File.rb', line 102

def sticky?
end

#symlink?Boolean

Returns:

  • (Boolean)


90
91
# File 'lib/framework/autocomplete/File.rb', line 90

def symlink?
end

#uidObject



34
35
# File 'lib/framework/autocomplete/File.rb', line 34

def uid
end

#world_readable?Boolean

Returns:

  • (Boolean)


66
67
# File 'lib/framework/autocomplete/File.rb', line 66

def world_readable?
end

#world_writable?Boolean

Returns:

  • (Boolean)


72
73
# File 'lib/framework/autocomplete/File.rb', line 72

def world_writable?
end

#writable?Boolean

Returns:

  • (Boolean)


68
69
# File 'lib/framework/autocomplete/File.rb', line 68

def writable?
end

#writable_real?Boolean

Returns:

  • (Boolean)


70
71
# File 'lib/framework/autocomplete/File.rb', line 70

def writable_real?
end

#zero?Boolean

Returns:

  • (Boolean)


80
81
# File 'lib/framework/autocomplete/File.rb', line 80

def zero?
end