コード例 #1
0
        public void DeleteFile(string dfsfile)
        {
            ensureconnected();

            netstm.WriteByte((byte)'d');
            XContent.SendXContent(netstm, dfsfile);
            ensurenextplus();
        }
コード例 #2
0
        public void SetFileContent(string dfsfile, string dfsfiletype, byte[] content, int contentlength)
        {
            ensureconnected();

            netstm.WriteByte((byte)'p');
            XContent.SendXContent(netstm, dfsfile);
            XContent.SendXContent(netstm, dfsfiletype);
            XContent.SendXContent(netstm, content, contentlength);
            ensurenextplus();
        }
コード例 #3
0
        public string GetFileSizeString(string dfsfile)
        {
            ensureconnected();

            netstm.WriteByte((byte)'s');
            XContent.SendXContent(netstm, dfsfile);
            ensurenextplus();
            string ssize = XContent.ReceiveXString(netstm, buf);

            return(ssize);
        }
コード例 #4
0
        public byte[] GetFileContent(string dfsfile)
        {
            ensureconnected();

            netstm.WriteByte((byte)'g');
            XContent.SendXContent(netstm, dfsfile);
            ensurenextplus();
            int len;

            buf = XContent.ReceiveXBytes(netstm, out len, buf);
            byte[] content = new byte[len];
            Buffer.BlockCopy(buf, 0, content, 0, len);
            return(content);
        }