I was playing around with Apache VFS API to move files back and forth between my local machine and remote linux host over sftp and it converted some directories to files somehow on my linux host from drw-r-----
to -rw-r-----
Does anyone know how to convert it back to a directory?
You have to remove the file and then make a directory containing the file's original name.
The problem is not that a directory was converted to a file, the problem was that a directory was deleted, and a file of the same name was created.