Module: VirtFS::NativeFS::Thick::FileClassMethods

Included in:
VirtFS::NativeFS::Thick
Defined in:
lib/virtfs/nativefs/thick/file_class_methods.rb

Overview

rubocop:disable ModuleLength

Instance Method Summary collapse

Instance Method Details

#file_atime(p) ⇒ Object



7
8
9
# File 'lib/virtfs/nativefs/thick/file_class_methods.rb', line 7

def file_atime(p)
  VfsRealFile.atime(p)
end

#file_blockdev?(p) ⇒ Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/virtfs/nativefs/thick/file_class_methods.rb', line 11

def file_blockdev?(p)
  VfsRealFile.blockdev?(apply_root(p))
end

#file_chardev?(p) ⇒ Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/virtfs/nativefs/thick/file_class_methods.rb', line 15

def file_chardev?(p)
  VfsRealFile.chardev?(apply_root(p))
end

#file_chmod(permission, p) ⇒ Object



19
20
21
# File 'lib/virtfs/nativefs/thick/file_class_methods.rb', line 19

def file_chmod(permission, p)
  VfsRealFile.chmod(permission, apply_root(p))
end

#file_chown(owner, group, p) ⇒ Object



23
24
25
# File 'lib/virtfs/nativefs/thick/file_class_methods.rb', line 23

def file_chown(owner, group, p)
  VfsRealFile.chown(owner, group, apply_root(p))
end

#file_ctime(p) ⇒ Object



27
28
29
# File 'lib/virtfs/nativefs/thick/file_class_methods.rb', line 27

def file_ctime(p)
  VfsRealFile.ctime(apply_root(p))
end

#file_delete(p) ⇒ Object



31
32
33
# File 'lib/virtfs/nativefs/thick/file_class_methods.rb', line 31

def file_delete(p)
  VfsRealFile.delete(apply_root(p))
end

#file_directory?(p) ⇒ Boolean

Returns:

  • (Boolean)


35
36
37
# File 'lib/virtfs/nativefs/thick/file_class_methods.rb', line 35

def file_directory?(p)
  VfsRealFile.directory?(apply_root(p))
end

#file_executable?(p) ⇒ Boolean

Returns:

  • (Boolean)


39
40
41
# File 'lib/virtfs/nativefs/thick/file_class_methods.rb', line 39

def file_executable?(p)
  VfsRealFile.executable?(apply_root(p))
end

#file_executable_real?(p) ⇒ Boolean

Returns:

  • (Boolean)


43
44
45
# File 'lib/virtfs/nativefs/thick/file_class_methods.rb', line 43

def file_executable_real?(p)
  VfsRealFile.executable_real?(apply_root(p))
end

#file_exist?(p) ⇒ Boolean

Returns:

  • (Boolean)


47
48
49
# File 'lib/virtfs/nativefs/thick/file_class_methods.rb', line 47

def file_exist?(p)
  VfsRealFile.exist?(apply_root(p))
end

#file_file?(p) ⇒ Boolean

Returns:

  • (Boolean)


51
52
53
# File 'lib/virtfs/nativefs/thick/file_class_methods.rb', line 51

def file_file?(p)
  VfsRealFile.file?(apply_root(p))
end

#file_ftype(p) ⇒ Object



55
56
57
# File 'lib/virtfs/nativefs/thick/file_class_methods.rb', line 55

def file_ftype(p)
  VfsRealFile.ftype(apply_root(p))
end

#file_grpowned?(p) ⇒ Boolean

Returns:

  • (Boolean)


59
60
61
# File 'lib/virtfs/nativefs/thick/file_class_methods.rb', line 59

def file_grpowned?(p)
  VfsRealFile.grpowned?(apply_root(p))
end

#file_identical?(p1, p2) ⇒ Boolean

Returns:

  • (Boolean)


63
64
65
# File 'lib/virtfs/nativefs/thick/file_class_methods.rb', line 63

def file_identical?(p1, p2)
  VfsRealFile.identical?(apply_root(p1), apply_root(p2))
end

#file_lchmod(permission, p) ⇒ Object



67
68
69
# File 'lib/virtfs/nativefs/thick/file_class_methods.rb', line 67

def file_lchmod(permission, p)
  VfsRealFile.lchmod(permission, apply_root(p))
end

#file_lchown(owner, group, p) ⇒ Object



71
72
73
# File 'lib/virtfs/nativefs/thick/file_class_methods.rb', line 71

def file_lchown(owner, group, p)
  VfsRealFile.lchown(owner, group, apply_root(p))
end


75
76
77
# File 'lib/virtfs/nativefs/thick/file_class_methods.rb', line 75

def file_link(p1, p2)
  VfsRealFile.link(apply_root(p1), apply_root(p2))
end

#file_lstat(p) ⇒ Object



79
80
81
# File 'lib/virtfs/nativefs/thick/file_class_methods.rb', line 79

def file_lstat(p)
  VfsRealFile.lstat(apply_root(p))
end

#file_mtime(p) ⇒ Object



83
84
85
# File 'lib/virtfs/nativefs/thick/file_class_methods.rb', line 83

def file_mtime(p)
  VfsRealFile.mtime(apply_root(p))
end

#file_new(f, parsed_args, _open_path, cwd) ⇒ Object



167
168
169
170
171
172
173
174
175
# File 'lib/virtfs/nativefs/thick/file_class_methods.rb', line 167

def file_new(f, parsed_args, _open_path, cwd)
  owd = VfsRealDir.getwd
  begin
    VfsRealDir.chdir(cwd)
    return VfsRealFile.new(apply_root(f), *parsed_args.args)
  ensure
    VfsRealDir.chdir(owd)
  end
end

#file_owned?(p) ⇒ Boolean

Returns:

  • (Boolean)


87
88
89
# File 'lib/virtfs/nativefs/thick/file_class_methods.rb', line 87

def file_owned?(p)
  VfsRealFile.owned?(apply_root(p))
end

#file_pipe?(p) ⇒ Boolean

Returns:

  • (Boolean)


91
92
93
# File 'lib/virtfs/nativefs/thick/file_class_methods.rb', line 91

def file_pipe?(p)
  VfsRealFile.pipe?(apply_root(p))
end

#file_readable?(p) ⇒ Boolean

Returns:

  • (Boolean)


95
96
97
# File 'lib/virtfs/nativefs/thick/file_class_methods.rb', line 95

def file_readable?(p)
  VfsRealFile.readable?(apply_root(p))
end

#file_readable_real?(p) ⇒ Boolean

Returns:

  • (Boolean)


99
100
101
# File 'lib/virtfs/nativefs/thick/file_class_methods.rb', line 99

def file_readable_real?(p)
  VfsRealFile.readable_real?(apply_root(p))
end


103
104
105
# File 'lib/virtfs/nativefs/thick/file_class_methods.rb', line 103

def file_readlink(p)
  VfsRealFile.readlink(apply_root(p))
end

#file_rename(p1, p2) ⇒ Object



107
108
109
# File 'lib/virtfs/nativefs/thick/file_class_methods.rb', line 107

def file_rename(p1, p2)
  VfsRealFile.rename(apply_root(p1), apply_root(p2))
end

#file_setgid?(p) ⇒ Boolean

Returns:

  • (Boolean)


111
112
113
# File 'lib/virtfs/nativefs/thick/file_class_methods.rb', line 111

def file_setgid?(p)
  VfsRealFile.setgid?(apply_root(p))
end

#file_setuid?(p) ⇒ Boolean

Returns:

  • (Boolean)


115
116
117
# File 'lib/virtfs/nativefs/thick/file_class_methods.rb', line 115

def file_setuid?(p)
  VfsRealFile.setuid?(apply_root(p))
end

#file_size(p) ⇒ Object



119
120
121
# File 'lib/virtfs/nativefs/thick/file_class_methods.rb', line 119

def file_size(p)
  VfsRealFile.size(apply_root(p))
end

#file_socket?(p) ⇒ Boolean

Returns:

  • (Boolean)


123
124
125
# File 'lib/virtfs/nativefs/thick/file_class_methods.rb', line 123

def file_socket?(p)
  VfsRealFile.socket?(apply_root(p))
end

#file_stat(p) ⇒ Object



127
128
129
# File 'lib/virtfs/nativefs/thick/file_class_methods.rb', line 127

def file_stat(p)
  VfsRealFile.stat(apply_root(p))
end

#file_sticky?(p) ⇒ Boolean

Returns:

  • (Boolean)


131
132
133
# File 'lib/virtfs/nativefs/thick/file_class_methods.rb', line 131

def file_sticky?(p)
  VfsRealFile.sticky?(apply_root(p))
end


135
136
137
# File 'lib/virtfs/nativefs/thick/file_class_methods.rb', line 135

def file_symlink(oname, p)
  VfsRealFile.symlink(oname, apply_root(p))
end

#file_symlink?(p) ⇒ Boolean

Returns:

  • (Boolean)


139
140
141
# File 'lib/virtfs/nativefs/thick/file_class_methods.rb', line 139

def file_symlink?(p)
  VfsRealFile.symlink?(apply_root(p))
end

#file_truncate(p, len) ⇒ Object



143
144
145
# File 'lib/virtfs/nativefs/thick/file_class_methods.rb', line 143

def file_truncate(p, len)
  VfsRealFile.truncate(apply_root(p), len)
end

#file_utime(atime, mtime, p) ⇒ Object



147
148
149
# File 'lib/virtfs/nativefs/thick/file_class_methods.rb', line 147

def file_utime(atime, mtime, p)
  VfsRealFile.utime(atime, mtime, apply_root(p))
end

#file_world_readable?(p) ⇒ Boolean

Returns:

  • (Boolean)


151
152
153
# File 'lib/virtfs/nativefs/thick/file_class_methods.rb', line 151

def file_world_readable?(p)
  VfsRealFile.world_readable?(apply_root(p))
end

#file_world_writable?(p) ⇒ Boolean

Returns:

  • (Boolean)


155
156
157
# File 'lib/virtfs/nativefs/thick/file_class_methods.rb', line 155

def file_world_writable?(p)
  VfsRealFile.world_writable?(apply_root(p))
end

#file_writable?(p) ⇒ Boolean

Returns:

  • (Boolean)


159
160
161
# File 'lib/virtfs/nativefs/thick/file_class_methods.rb', line 159

def file_writable?(p)
  VfsRealFile.writable?(apply_root(p))
end

#file_writable_real?(p) ⇒ Boolean

Returns:

  • (Boolean)


163
164
165
# File 'lib/virtfs/nativefs/thick/file_class_methods.rb', line 163

def file_writable_real?(p)
  VfsRealFile.writable_real?(apply_root(p))
end