From 848eb734b569b68154751409d3e1eb7daa1804ee Mon Sep 17 00:00:00 2001 From: Barry Tulchinsky Date: Thu, 19 Dec 2013 09:05:33 -0500 Subject: [PATCH] start of setxattr and getxattr implementation --- src/fs.js | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/fs.js b/src/fs.js index d5ad38d..61bc0ac 100644 --- a/src/fs.js +++ b/src/fs.js @@ -1531,14 +1531,24 @@ define(function(require) { }); } - function _getxattr(path, name, callback) { - // TODO - // if(!nullCheck(path, callback)) return; + function _getxattr(context, path, name, callback) { + if(!nullCheck(path, callback)) return; + } - function _setxattr(path, name, value, callback) { - // TODO - // if(!nullCheck(path, callback)) return; + function _setxattr(context, path, name, value, callback) { + if(!nullCheck(path, callback)) return; + + function check_result (error) { + if (error) { + callback(error); + } + else { + callback(null); + } + }; + + setxattr_file (context, path, name, value, check_result); } function _lseek(fs, context, fd, offset, whence, callback) {