I am making a file explorer. Now for my file copy method it takes two inputs, a file source and file destination. All are File objects.
Here is an example of what I need:
String source: C:\Windows\Test\test.txt
String dest: C:\Somewhere\Windows\Test\test.txt
The user would have dragged the folder C:\Windows\Test\ to C:\Somewhere\
The file will be an exact copy... but I need to extract that Windows\Test\ and append it to the destination String.
Right now, a user would do the above and the resultant File would be C:\Somewhere\test.txt... I need that extra directory information.