Esempio n. 1
0
		/// <exception cref="System.Exception"></exception>
		private void SendMKDIR(byte[] path, SftpATTRS attr)
		{
			packet.Reset();
			PutHEAD(SSH_FXP_MKDIR, 9 + path.Length + (attr != null ? attr.Length() : 4));
			buf.PutInt(seq++);
			buf.PutString(path);
			// path
			if (attr != null)
			{
				attr.Dump(buf);
			}
			else
			{
				buf.PutInt(0);
			}
			GetSession().Write(packet, this, 9 + path.Length + (attr != null ? attr.Length() : 
				4) + 4);
		}
Esempio n. 2
0
		/// <exception cref="System.Exception"></exception>
		private void SendSETSTAT(byte[] path, SftpATTRS attr)
		{
			packet.Reset();
			PutHEAD(SSH_FXP_SETSTAT, 9 + path.Length + attr.Length());
			buf.PutInt(seq++);
			buf.PutString(path);
			// path
			attr.Dump(buf);
			GetSession().Write(packet, this, 9 + path.Length + attr.Length() + 4);
		}