[英]Reading contents shared on Windows machine from Unix Box with a Java Program
I have shared contents on windows machine say \\someip\\somedirectory and now I want to write a program in Java that runs on Unix Box and reads contents of the shared folder. 我在Windows机器上有共享内容,说\\ someip \\ somedirectory,现在我想用Java编写一个程序,该程序在Unix Box上运行并读取共享文件夹的内容。
File file=new File(directoryPath);
if(file.isDirectory()) returns false.
Therefore I am failing on the first step itself. 因此,我本身没有第一步。 Please suggest how can I do that.
请提出我该怎么做。
You should use return
instead of returns
: 您应该使用
return
,而不是returns
:
File file=new File(directoryPath);
if(file.isDirectory()) return false;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.