I have Java code that transfers a file from FTP to Mainframe to my local system. The problem is how to determine if a given path is a file or folder? I canโt use validation for extensions, since I donโt know what extensions might be. Also the following code always returns false,
fileSystem.isFile("fileName");
Being a mainframe file system, the path is split into . instead of / , and therefore checking for . at the end also does not work.
Again I am transferring data from the input path to the output location using
url="connection url of the mainframe" bufferedInputStream = new BufferedInputStream(url.getInputStream());
When I have files on the source path, it writes the contents of the file to the destination, and when the source path has a directory, it writes the names and other properties of the files in the directory to the destination.
An example output when the source is a directory is
Name VV.MM Created Changed Size Init Mod Id QQQQ 01.00 2009/12/18 2009/12/18 12:15 18 18 0 XXXX RRRR 01.00 2009/12/18 2009/12/18 12:16 19 19 0 XXXXX
How to determine if the source path is a file or folder?
source share