Ejemplo n.º 1
0
        public Result SetPathExtendedAttribute(string path, string name, byte[] value, XattrFlags flags)
        {
#if DEBUG
            var request = new CrazyFsRequest(CrazyFsRequestName.SetPathExtendedAttribute, new[]
            {
                new KeyValuePair <string, string>("path", path),
                new KeyValuePair <string, string>("name", name),
                new KeyValuePair <string, string>("flags", flags.ToString())
            }).Log();
#endif
            try
            {
                FileSystem.Path.SetExtendedAttributes(path, name, value, flags);
                var result = new Result(ResultStatus.Success);
#if DEBUG
                request.Log(result);
#endif
                return(result);
            }
            catch (Exception ex)
            {
                var result = ex.GetResult();
#if DEBUG
                request.Log(result);
#endif
                return(result);
            }
        }