Class: Puppet::FileSystem::JRuby
- Inherits:
-
Posix
show all
- Defined in:
- lib/puppet/file_system/jruby.rb
Instance Method Summary
collapse
Methods inherited from Posix
#binread, #compare_stream
Methods inherited from FileImpl
#assert_path, #basename, #binread, #children, #chmod, #compare_stream, #dir, #directory?, #each_line, #exclusive_create, #exclusive_open, #executable?, #exist?, #expand_path, #file?, #lstat, #mkpath, #open, #path_string, #pathname, #read, #read_preserve_line_endings, #readlink, #size, #stat, #symlink, #symlink?, #touch, #writable?
Instance Method Details
#replace_file(path, mode = nil, &block) ⇒ Object
14
15
16
17
18
19
20
21
22
|
# File 'lib/puppet/file_system/jruby.rb', line 14
def replace_file(path, mode = nil, &block)
if Puppet::FileSystem.directory?(path)
raise Errno::EISDIR, _("Is a directory: %{directory}") % { directory: path }
end
super
end
|
#unlink(*paths) ⇒ Object
4
5
6
7
8
9
10
11
12
|
# File 'lib/puppet/file_system/jruby.rb', line 4
def unlink(*paths)
File.unlink(*paths)
rescue Errno::ENOENT
stat(*paths)
end
|