Beispiel #1
0
        private void cmd_mlsd(string cmd, string p1)
        {
            string  path     = this.apply_path(p1);
            Ftplink dataLink = this.get_data_link();

            if (dataLink == null)
            {
                return;
            }
            foreach (Fileinfo f in this.files.get_index(path))
            {
                dataLink.netprintf("{0}\r\n", (object)this.fact_get(f));
            }
            dataLink.netclose();
            this.send("226 Transfer complete for path {0}\r\n", (object)path);
        }
Beispiel #2
0
        private void cmd_nlst(string cmd, string p1)
        {
            Ftplink dataLink = this.get_data_link();

            if (dataLink == null)
            {
                return;
            }
            string path = this.apply_path(p1);

            foreach (Fileinfo fileinfo in this.files.get_index_fast(path))
            {
                dataLink.netprintf("{0}\r\n", (object)clib.string_to_utf8(clib.fileonly(fileinfo.name, this.cwd)));
            }
            dataLink.netclose();
            this.send("226 Transfer complete for path {0}\r\n", (object)path);
        }