Beispiel #1
0
    static void Dir(string [] Input)
    {
        if (!Client.IsConnected)
        {
            Console.WriteLine("Please connect to a server first.");
            return;
        }
        int Cnt;

        FileItem [] FileList;
        Client.GetList();
        FileList = Client.GetDirectoryListing();
        Console.WriteLine("Directory of " + Client.WorkDir + "\r\n");
        for (Cnt = 0; Cnt < Client.GetDirectoryListCount(); Cnt++)
        {
            Console.Write(FileList[Cnt].FileDate.ToString("yyyy/MM/dd") + "  " + FileList[Cnt].FileDate.ToString("hh:mm"));
            if (FileList[Cnt].IsDirectory)
            {
                Console.Write("        <DIR>   ");
            }
            else
            {
                Console.Write(LongToString(FileList[Cnt].FileSize, 14) + "  ");
            }
            Console.WriteLine(FileList[Cnt].FileTitle);
        }
        Console.WriteLine("");
    }