I have a requirement, which says,
If file exists and is not readable then Update in DB with
file path and some Status.
Is it possible to Have File Exists and is not readable?
Is Yes, How to identify through coldfusion such type of files,
I know we can identify if it is exists or not, but i wanted to know, how to identify If it is readable or no?
I am using Windows server and Coldfusion 8
Thanks,
By using GetFileInfo(path) you can get the size of the file and whether or not read and write permissions are enabled. It will also return the ‘type’, but it’s simply ‘file’ vs ‘folder’, not mime-type.
Example:
Example in use:
If your requirement assumes that you’re validating the file type and not just the ability to open the file, then you will need to update your question to list the file types you must test for so that we can help you out with that part. Some types can be validated by Coldfusion, others may require some Java.