Exemplo n.º 1
0
        static void touch(string path)
        {
            string name;
            string directory;

            name      = path.Split('/').Last();
            directory = path.Substring(0, path.Length - name.Length - 1);

            try
            {
                if (directory.Trim().Length == 0)
                {
                    Console.WriteLine(nameServer.touch("/", name));
                }
                else
                {
                    Console.WriteLine(nameServer.touch(directory, name));
                }
            }
            catch (Exception)
            {
                Console.WriteLine("Device temporarily unavailable. Try again later.");
            }
        }