报的是文件不可用,在Windos下没问题
UNIX 下就报了550说文件不可用,是不是我路径配错了?
我是找的一个FTP库,是通过Socket连接的。
我配的获得文件的路径是/aaa
是不是配的有问题?
public virtual void SetCurrentDirectory(String remotePath)
{
LockTcpClient(); ArrayList tempMessageList = new ArrayList();
int returnValue = 0;
tempMessageList = SendCommand("CWD " + remotePath);
returnValue = GetMessageReturnValue((string)tempMessageList[0]);
if(returnValue != 250)
{
throw new Exception((string)tempMessageList[0]);
} UnlockTcpClient();
}
public ArrayList SendCommand(String command)
{
NetworkStream stream = this.tcpClient.GetStream();
this.activeConnectionsCount++; Byte[] cmdBytes = Encoding.ASCII.GetBytes((command+"\r\n").ToCharArray());
stream.Write(cmdBytes, 0, cmdBytes.Length); this.activeConnectionsCount--; return Read();
}
我需要怎么改?新手求助!