Delphi在localhost中查找可写文件夹

时间:2013-04-15 16:41:16

标签: delphi

SetCurrentDir(s); // S='//localhost/'
FindFirst(s+'*.*', faDirectory, searchResult);
x:=searchResult.Name;  // Result (name finded folder)
  1. 我试图在//127.0.0.1/目录中找到文件夹。此代码在localhost目录下工作,结果为空。

  2. 如何检测检测到的文件夹是可写的还是只能读取?

1 个答案:

答案 0 :(得分:4)

\\127.0.0.1\不是目录。它是本地计算机上共享的任何文件夹的基本UNC。如何列出共享文件夹,查看此问题或在网上搜索示例:

Enumerate list of network computers and shared folders in a tree view?

相关问题