Impelement using Delph the following threaded class:
* After started, the thread remains alive until it receives input
* The thread gets a TStringList as an input, the list contains a list of filenames and paths.
* After an input list is received, the thread will check each of the given filenames for validity and returns via an event the answer if each of the filenames are in fact valid. The returning event should return the filename in question, and the result of the file or directory existance as an integer. 1 if the file or dir exists, 0 if it doesn't exist and -1 if the file or directory is a reference to a non-fixed drive, such as a floppy disk or a cd-rom drive.
Notice that the file or directory existance check must work with:
* both 64 bit and 32 bit filesystems
* Also in cases where the file does exist, but the application code doesn't have sufficent rights to access the file.
Note: his is much more complex than a simple Result := FileExists(line) or DirectoryExists(line); This code would fail, for example, if the code is running under a 64 bit Windows system as a 32 bit application, and was trying to check if a file or directory exists in the 64 bit view of the filesystem.
Note: This class must be thread safe. This threaded class will be created and used from another thread. When the job is done, please provide a simple demo app to see how the code works.