Methods
- A
- B
- C
- D
- E
- F
- I
- J
- L
- M
- N
- R
- S
- T
- W
Classes and Modules
- CLASS FakeFS::File::Stat
Constants
PATH_SEPARATOR | = | '/' |
MODES | = | [ READ_ONLY = "r", READ_WRITE = "r+", WRITE_ONLY = "w", READ_WRITE_TRUNCATE = "w+", APPEND_WRITE_ONLY = "a", APPEND_READ_WRITE = "a+" ] |
FILE_CREATION_MODES | = | MODES - [READ_ONLY, READ_WRITE] |
MODE_BITMASK | = | RealFile::RDONLY | RealFile::WRONLY | RealFile::RDWR | RealFile::APPEND | RealFile::CREAT | RealFile::EXCL | RealFile::NONBLOCK | RealFile::TRUNC | RealFile::NOCTTY | RealFile::SYNC |
FILE_CREATION_BITMASK | = | RealFile::CREAT |
Attributes
[R] | path |
Class Public methods
# File lib/fakefs/file.rb, line 159 def self.delete(file_name, *additional_file_names) if !exists?(file_name) raise Errno::ENOENT, "No such file or directory - #{file_name}" end FileUtils.rm(file_name) additional_file_names.each do |file_name| FileUtils.rm(file_name) end additional_file_names.size + 1 end
# File lib/fakefs/file.rb, line 139 def self.link(source, dest) if directory?(source) raise Errno::EPERM, "Operation not permitted - #{source} or #{dest}" end if !exists?(source) raise Errno::ENOENT, "No such file or directory - #{source} or #{dest}" end if exists?(dest) raise Errno::EEXIST, "File exists - #{source} or #{dest}" end source = FileSystem.find(source) dest = FileSystem.add(dest, source.entry.clone) source.link(dest) 0 end
Instance Public methods