summaryrefslogtreecommitdiff
path: root/lib/ffi-xattr/extensions/file.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ffi-xattr/extensions/file.rb')
-rw-r--r--lib/ffi-xattr/extensions/file.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/ffi-xattr/extensions/file.rb b/lib/ffi-xattr/extensions/file.rb
new file mode 100644
index 0000000..200f024
--- /dev/null
+++ b/lib/ffi-xattr/extensions/file.rb
@@ -0,0 +1,9 @@
+require 'ffi-xattr'
+
+class File
+
+ # Returns an Xattr object for the named file (see Xattr).
+ def self.xattr(file_name)
+ Xattr.new(file_name)
+ end
+end