Java method to determine whether a file exists on a remote server

  • 2020-04-01 01:35:58
  • OfStack

Doing data file import to     LEFTII    In is encountered a file, when doing the import sometimes generated the original file may not exist, now by adding a judgment, whether the file exists, at first thought of a simple judgment file & PI;   File. The exists ()     Save or not, but it turns out that this is only a way to tell if a local file exists.

Here's a neat way to show you that by sharing remote files locally, you can easily solve this problem with computer diffraction

The process is as follows

< img border = 0 SRC = "/ / files.jb51.net/file_images/article/201303/2013319104716369.jpg" >

< img border = 0 SRC = "/ / files.jb51.net/file_images/article/201303/2013319104855071.jpg" >

Then enter the username and password in the following steps, so that you can determine whether the file exists locally.

Related articles: