Class: File::Stat

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

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



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

#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