private static void Binary() { if ((client == null) || !client.IsConnected) { Console.WriteLine("not connected."); } else { FtpReply reply = client.Execute("TYPE I"); Console.WriteLine(reply.Code + " " + reply.Message); } }
public override void SetFilePermissions(SyncQueueItem i, short mode) { string command; var reply = new FtpReply(); if (_ftpc.Capabilities.HasFlag(FtpCapability.MFF)) { command = string.Format("MFF UNIX.mode={0}; {1}", mode, i.CommonPath); reply = _ftpc.Execute(command); } if (!reply.Success) { command = string.Format("SITE CHMOD {0} {1}", mode, i.CommonPath); reply = _ftpc.Execute(command); } if (!reply.Success) { Log.Write(l.Error, "chmod failed, file: {0} msg: {1}", i.CommonPath, reply.ErrorMessage); } }