Re: How to list out files from UNC path?

2017-09-13 Thread Bernd Eckenfels
Hello,

Not sure I understand your question, for current VFS you need VFS Core, VFS 
Sandbox Provider and jCIFS library. 
https://commons.apache.org/proper/commons-vfs/download.html describes how to 
build the Sandbox code.

The new version with a modern (and better licensed) smbj variant will be 
included when it is ready, the work is going on here: 
https://github.com/codyswanson4/commons-vfs/commits/trunk thanks to Cody 
Swanson.

Gruss
Bernd
--
http://bernd.eckenfels.net

From: prabhu Mahendran <prabhuu161...@gmail.com>
Sent: Wednesday, September 13, 2017 4:11:26 PM
To: Commons Users List
Subject: Re: How to list out files from UNC path?

Am more interested to use apache license libraries only.

Can you please tell me that Jcifs applicable under common-vfs library or
both libraries different?
On 13-Sep-2017 6:51 PM, "Bernd Eckenfels" <e...@zusammenkunft.net> wrote:

> I think the code looks fine, the URL needs to be in VFS syntax (you need
> to convert the UNC path into "smb://host/share/dir" and the SMB provider
> with jcifs library needs to be on the classpath.
>
> Gruss
> Bernd
> --
> http://bernd.eckenfels.net
> 
> From: prabhu Mahendran <prabhuu161...@gmail.com>
> Sent: Wednesday, September 13, 2017 2:42:44 PM
> To: Commons Users List
> Subject: Re: How to list out files from UNC path?
>
> Hi Bernd,
>
> Thanks for your response.
>
> I have tried commons-vfs-2.1.jar with following code to get files inside
> folder in windows OS.
>
> StaticUserAuthenticator auth = new StaticUserAuthenticator("domainname",
> "username", "password");
> FileSystemOptions opts = new FileSystemOptions();
> DefaultFileSystemConfigBuilder.getInstance().setUserAuthenticator(opts,
> auth);
> FileObject fo =
> VFS.getManager().resolveFile("servername\\directory\\foldername",
> opts);
> FileObject[] fos=fo.getChildren();
>
> In that works correctly when i mount the servername\\directory\\folder
> into my fileexplorer.
>
> Since am using this command "net use /d *" to delete default credentials
> stored in windows while accessing unc path.Because my UNC path process one
> time validation for credentials.Once validation success for one time then
> next time it not prompts for credentials it directly enters into folder.
>
> Once i executed that net use command successfully then run my api using vfs
> jar it could not get children of that shared folder present in UNC Path.
>
> am googling but not find better solution.
>
> Could you give any suggestion for solve that issue?
>
> Best,
> Mahendran
>
>
>
> On Wed, Sep 13, 2017 at 5:08 PM, Bernd Eckenfels <e...@zusammenkunft.net>
> wrote:
>
> > Hello,
> >
> > Yes and no. With the Cifs provider contained in the VFS Sandbox you can
> > directly connect to a SMB1.0 server (and use the normal VFS API to list
> > files). However for licensing reasons we do not ship binaries, so you
> have
> > to compile the provider on your own. The other problem is, that it only
> > supports SMB1.0 with increasingly gets switched off.
> >
> > A new component which fixes both problems (based on smbj) is in the
> makes.
> > You can check the development mailing list archive for the Github fork. I
> > haven't however yet used it personally so I am not quite sure how far it
> is
> > (but I would assume listing files works).
> >
> > Gruss
> > Bernd
> > --
> > http://bernd.eckenfels.net
> > 
> > From: prabhu Mahendran <prabhuu161...@gmail.com>
> > Sent: Wednesday, September 13, 2017 12:41:52 PM
> > To: user@commons.apache.org
> > Subject: How to list out files from UNC path?
> >
> > Hi All,
> >
> > Is this possible to list out files present in UNC
> > Path(//hostname/foldername) with valid credentials using VFS library?
> >
> > Generally I wants to get files present in network folder in which needs
> > credentials  to access files.
> >
> > Now i need to list out files using java api.
> >
> > Can anyone suggest me way to do that?
> >
> > Thanks,
> > Mahendran
> >
>


Re: How to list out files from UNC path?

2017-09-13 Thread prabhu Mahendran
Am more interested to use apache license libraries only.

Can you please tell me that Jcifs applicable under common-vfs library or
both libraries different?
On 13-Sep-2017 6:51 PM, "Bernd Eckenfels" <e...@zusammenkunft.net> wrote:

> I think the code looks fine, the URL needs to be in VFS syntax (you need
> to convert the UNC path into "smb://host/share/dir" and the SMB provider
> with jcifs library needs to be on the classpath.
>
> Gruss
> Bernd
> --
> http://bernd.eckenfels.net
> 
> From: prabhu Mahendran <prabhuu161...@gmail.com>
> Sent: Wednesday, September 13, 2017 2:42:44 PM
> To: Commons Users List
> Subject: Re: How to list out files from UNC path?
>
> Hi Bernd,
>
> Thanks for your response.
>
> I have tried commons-vfs-2.1.jar with following code to get files inside
> folder in windows OS.
>
> StaticUserAuthenticator auth = new StaticUserAuthenticator("domainname",
> "username", "password");
> FileSystemOptions opts = new FileSystemOptions();
> DefaultFileSystemConfigBuilder.getInstance().setUserAuthenticator(opts,
> auth);
> FileObject fo =
> VFS.getManager().resolveFile("servername\\directory\\foldername",
> opts);
> FileObject[] fos=fo.getChildren();
>
> In that works correctly when i mount the servername\\directory\\folder
> into my fileexplorer.
>
> Since am using this command "net use /d *" to delete default credentials
> stored in windows while accessing unc path.Because my UNC path process one
> time validation for credentials.Once validation success for one time then
> next time it not prompts for credentials it directly enters into folder.
>
> Once i executed that net use command successfully then run my api using vfs
> jar it could not get children of that shared folder present in UNC Path.
>
> am googling but not find better solution.
>
> Could you give any suggestion for solve that issue?
>
> Best,
> Mahendran
>
>
>
> On Wed, Sep 13, 2017 at 5:08 PM, Bernd Eckenfels <e...@zusammenkunft.net>
> wrote:
>
> > Hello,
> >
> > Yes and no. With the Cifs provider contained in the VFS Sandbox you can
> > directly connect to a SMB1.0 server (and use the normal VFS API to list
> > files). However for licensing reasons we do not ship binaries, so you
> have
> > to compile the provider on your own. The other problem is, that it only
> > supports SMB1.0 with increasingly gets switched off.
> >
> > A new component which fixes both problems (based on smbj) is in the
> makes.
> > You can check the development mailing list archive for the Github fork. I
> > haven't however yet used it personally so I am not quite sure how far it
> is
> > (but I would assume listing files works).
> >
> > Gruss
> > Bernd
> > --
> > http://bernd.eckenfels.net
> > 
> > From: prabhu Mahendran <prabhuu161...@gmail.com>
> > Sent: Wednesday, September 13, 2017 12:41:52 PM
> > To: user@commons.apache.org
> > Subject: How to list out files from UNC path?
> >
> > Hi All,
> >
> > Is this possible to list out files present in UNC
> > Path(//hostname/foldername) with valid credentials using VFS library?
> >
> > Generally I wants to get files present in network folder in which needs
> > credentials  to access files.
> >
> > Now i need to list out files using java api.
> >
> > Can anyone suggest me way to do that?
> >
> > Thanks,
> > Mahendran
> >
>


Re: How to list out files from UNC path?

2017-09-13 Thread Bernd Eckenfels
I think the code looks fine, the URL needs to be in VFS syntax (you need to 
convert the UNC path into "smb://host/share/dir" and the SMB provider with 
jcifs library needs to be on the classpath.

Gruss
Bernd
--
http://bernd.eckenfels.net

From: prabhu Mahendran <prabhuu161...@gmail.com>
Sent: Wednesday, September 13, 2017 2:42:44 PM
To: Commons Users List
Subject: Re: How to list out files from UNC path?

Hi Bernd,

Thanks for your response.

I have tried commons-vfs-2.1.jar with following code to get files inside
folder in windows OS.

StaticUserAuthenticator auth = new StaticUserAuthenticator("domainname",
"username", "password");
FileSystemOptions opts = new FileSystemOptions();
DefaultFileSystemConfigBuilder.getInstance().setUserAuthenticator(opts,
auth);
FileObject fo =
VFS.getManager().resolveFile("servername\\directory\\foldername", opts);
FileObject[] fos=fo.getChildren();

In that works correctly when i mount the servername\\directory\\folder
into my fileexplorer.

Since am using this command "net use /d *" to delete default credentials
stored in windows while accessing unc path.Because my UNC path process one
time validation for credentials.Once validation success for one time then
next time it not prompts for credentials it directly enters into folder.

Once i executed that net use command successfully then run my api using vfs
jar it could not get children of that shared folder present in UNC Path.

am googling but not find better solution.

Could you give any suggestion for solve that issue?

Best,
Mahendran



On Wed, Sep 13, 2017 at 5:08 PM, Bernd Eckenfels <e...@zusammenkunft.net>
wrote:

> Hello,
>
> Yes and no. With the Cifs provider contained in the VFS Sandbox you can
> directly connect to a SMB1.0 server (and use the normal VFS API to list
> files). However for licensing reasons we do not ship binaries, so you have
> to compile the provider on your own. The other problem is, that it only
> supports SMB1.0 with increasingly gets switched off.
>
> A new component which fixes both problems (based on smbj) is in the makes.
> You can check the development mailing list archive for the Github fork. I
> haven't however yet used it personally so I am not quite sure how far it is
> (but I would assume listing files works).
>
> Gruss
> Bernd
> --
> http://bernd.eckenfels.net
> 
> From: prabhu Mahendran <prabhuu161...@gmail.com>
> Sent: Wednesday, September 13, 2017 12:41:52 PM
> To: user@commons.apache.org
> Subject: How to list out files from UNC path?
>
> Hi All,
>
> Is this possible to list out files present in UNC
> Path(//hostname/foldername) with valid credentials using VFS library?
>
> Generally I wants to get files present in network folder in which needs
> credentials  to access files.
>
> Now i need to list out files using java api.
>
> Can anyone suggest me way to do that?
>
> Thanks,
> Mahendran
>


Re: How to list out files from UNC path?

2017-09-13 Thread prabhu Mahendran
Hi Bernd,

Thanks for your response.

I have tried commons-vfs-2.1.jar with following code to get files inside
folder in windows OS.

StaticUserAuthenticator auth = new StaticUserAuthenticator("domainname",
"username", "password");
FileSystemOptions opts = new FileSystemOptions();
DefaultFileSystemConfigBuilder.getInstance().setUserAuthenticator(opts,
auth);
FileObject fo =
VFS.getManager().resolveFile("servername\\directory\\foldername", opts);
FileObject[] fos=fo.getChildren();

In that works correctly when i mount the servername\\directory\\folder
into my fileexplorer.

Since am using this command "net use /d *" to delete default credentials
stored in windows while accessing unc path.Because my UNC path process one
time validation for credentials.Once validation success for one time then
next time it not prompts for credentials it directly enters into folder.

Once i executed that net use command successfully then run my api using vfs
jar it could not get children of that shared folder present in UNC Path.

am googling but not find better solution.

Could you give any suggestion for solve that issue?

Best,
Mahendran



On Wed, Sep 13, 2017 at 5:08 PM, Bernd Eckenfels <e...@zusammenkunft.net>
wrote:

> Hello,
>
> Yes and no. With the Cifs provider contained in the VFS Sandbox you can
> directly connect to a SMB1.0 server (and use the normal VFS API to list
> files). However for licensing reasons we do not ship binaries, so you have
> to compile the provider on your own. The other problem is, that it only
> supports SMB1.0 with increasingly gets switched off.
>
> A new component which fixes both problems (based on smbj) is in the makes.
> You can check the development mailing list archive for the Github fork. I
> haven't however yet used it personally so I am not quite sure how far it is
> (but I would assume listing files works).
>
> Gruss
> Bernd
> --
> http://bernd.eckenfels.net
> 
> From: prabhu Mahendran <prabhuu161...@gmail.com>
> Sent: Wednesday, September 13, 2017 12:41:52 PM
> To: user@commons.apache.org
> Subject: How to list out files from UNC path?
>
> Hi All,
>
> Is this possible to list out files present in UNC
> Path(//hostname/foldername) with valid credentials using VFS library?
>
> Generally I wants to get files present in network folder in which needs
> credentials  to access files.
>
> Now i need to list out files using java api.
>
> Can anyone suggest me way to do that?
>
> Thanks,
> Mahendran
>


Re: How to list out files from UNC path?

2017-09-13 Thread Bernd Eckenfels
Hello,

Yes and no. With the Cifs provider contained in the VFS Sandbox you can 
directly connect to a SMB1.0 server (and use the normal VFS API to list files). 
However for licensing reasons we do not ship binaries, so you have to compile 
the provider on your own. The other problem is, that it only supports SMB1.0 
with increasingly gets switched off.

A new component which fixes both problems (based on smbj) is in the makes. You 
can check the development mailing list archive for the Github fork. I haven't 
however yet used it personally so I am not quite sure how far it is (but I 
would assume listing files works).

Gruss
Bernd
--
http://bernd.eckenfels.net

From: prabhu Mahendran <prabhuu161...@gmail.com>
Sent: Wednesday, September 13, 2017 12:41:52 PM
To: user@commons.apache.org
Subject: How to list out files from UNC path?

Hi All,

Is this possible to list out files present in UNC
Path(//hostname/foldername) with valid credentials using VFS library?

Generally I wants to get files present in network folder in which needs
credentials  to access files.

Now i need to list out files using java api.

Can anyone suggest me way to do that?

Thanks,
Mahendran


How to list out files from UNC path?

2017-09-13 Thread prabhu Mahendran
Hi All,

Is this possible to list out files present in UNC
Path(//hostname/foldername) with valid credentials using VFS library?

Generally I wants to get files present in network folder in which needs
credentials  to access files.

Now i need to list out files using java api.

Can anyone suggest me way to do that?

Thanks,
Mahendran