class MemFs::Fake::Entry
Constants
- GEXEC
- GREAD
- GWRITE
- OEXEC
- OREAD
- OWRITE
- RSTICK
- SETGID
- SETUID
- UEXEC
- UREAD
- USTICK
- UWRITE
Attributes
Public Class Methods
Source
# File lib/memfs/fake/entry.rb, line 57 def initialize(path = nil) time = Time.now self.atime = time self.ctime = time self.gid = Process.egid self.mode = 0666 - MemFs::File.umask self.mtime = time self.name = MemFs::File.basename(path || '') self.uid = Process.euid end
Public Instance Methods
Source
# File lib/memfs/fake/entry.rb, line 53 def find(_path) fail Errno::ENOTDIR, path end
Source
# File lib/memfs/fake/entry.rb, line 72 def mode=(mode_int) @mode = 0100000 | mode_int end
Source
# File lib/memfs/fake/entry.rb, line 76 def path parts = [parent && parent.path, name].compact MemFs::File.join(parts) end
Source
# File lib/memfs/fake/entry.rb, line 85 def touch self.atime = self.mtime = Time.now end