Exemplo n.º 1
0
        private static void Mkdir(string[] path)
        {
            var fid = _client.AllocateFid(Constants.RootFid);

            foreach (var dir in path)
            {
                var dirFid = _client.AllocateFid(fid);
                try
                {
                    _client.Create(dirFid, dir, DirPerm, Constants.Oread);
                }
                catch (Exception)
                {
                    //Ignoring errors doesn't seem right, but we do this in Go...
                }
                _client.FreeFid(dirFid);
                _client.Walk(fid, fid, new[] { dir });
            }
            _client.FreeFid(fid);
        }