Exemplo n.º 1
0
        private static void Create(string[] path)
        {
            var          fid   = _client.AllocateFid(Constants.RootFid);
            var          dirs  = path.Take(path.Length - 1).ToArray();
            var          utf8  = new UTF8Encoding();
            const string value = "baz";

            _client.Walk(fid, fid, dirs);
            _client.Create(fid, path.Last(), FilePerm, Constants.Ordwr);
            _client.Write(fid, 0, (uint)utf8.GetByteCount(value), utf8.GetBytes(value));
            _client.FreeFid(fid);
        }