在PPC上查看PC的文件夹/文件 [英] View Folder/Files of PC on PPC

查看:79
本文介绍了在PPC上查看PC的文件夹/文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!
我使用TCP侦听器/TCP客户端在PC和PPC之间进行连接.我还将消息从客户端(PPC)发送到服务器(PC).现在,我希望从PPC中查看PC的文件夹列表/文件列表.我从哪里开始?我可以使用DirectoryInfo获取文件夹名称和文件名,然后发送给客户端吗?
需要您的帮助
非常感谢您.

Hi all!
I use TCP Listener/TCP client to connect between PC and PPC. I also send message from client(PPC) to server(PC). And now I hope see folder list/file list of PC from PPC. Where can I begin? Can I use DirectoryInfo to get folder name and file name, then I send to client?
Need your helps
Thank you very much

推荐答案

首先,关于在目录中获取文件/目录:您应该意识到一个问题.请参阅以下讨论: Directory.Get.Files搜索模式问题 [ ^ ].您还将找到解决方案.这都是有关服务器上文件结构的信息.

找到有关网络应用程序设计的一些有用的想法:
来自同一端口号的多个客户端 [如何将byte []发送到另一台PC [ ^ ],
在局域网上与两个Windows应用程序进行通信. [ ^ ].
抱歉,我提到的某些网络模型与您的情况无关.在这种情况下,我建议您坚持选择以下级别:TcpListener/TcpClient级别.还可以考虑使用经典远程处理或WCF(自托管).

从以上参考资料中,您将看到成功进行网络设计的关键之一就是线程化.这是我对以前有关该主题的答案的引用的有用集合:
如何获取keydown事件在vb.net中的不同线程上操作 [如何将ref参数传递给线程 [ ^ ].

—SA
First, about getting files/directories in directory: there is one problem you should be aware of. See this discussion: Directory.Get.Files search pattern problem[^]. You will find a solution as well. This is all about information on file structure on your server.

Find some useful ideas about networking application design:
Multple clients from same port Number[^],
how i can send byte[] to other pc[^],
Communication b/w two Windows applications on LAN.[^].
Sorry, some models of networking I mentioned are not relevant to your case. In you case I advice you stick to your level of choice: TcpListener/TcpClient level. Classical remoting or WCF (self-hosted) also can be considered.

From the above references you will see that one of the keys to successful networking design is threading. This is a useful collection of my references to my past Answers on the topic:
How to get a keydown event to operate on a different thread in vb.net[^];
This is a very useful thread wrapper:
How to pass ref parameter to the thread[^].

—SA


这篇关于在PPC上查看PC的文件夹/文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆