Find Jobs
Hire Freelancers

Create two simple but threaded Delphi file access classes

$30-250 USD

In Progress
Posted over 11 years ago

$30-250 USD

Paid on delivery
Implement in Delphi 2010 (or compatible) the following two threaded classes: TThreadedFileExtCollector * This class will receive as an input a directory path (e.g. 'c:\', or 'd:\stuff\'), from this directory path, including its sub-directories, the thread will iterate all the files and return to the main program thread (i.e. the piece of code that called the thread) a TStringList with all the file extensions. The result list must not contain duplicate lines. An example of a result list could be: .exe .dll .jpg .txt The class must contain a method of aborting the iteration from the main program thread, for example, a Kill() method, which would without any further delay stop the directory structure iteration and return the result list. TThreadedFileVerificator * This class will receive as an input two TStringLists: 1) VerifyExtList and 2) VerifyAttribList. The VerifyExtList input string list contains a list of filenames and paths. The class will go through the VerifyExtList string list and verifies the given file or directory exists, if it doesn't exist, it is created. An example VerifyExtList could be: c:\foobar\ c:\qwerty\[login to view URL] Note: If the input list line is a filename, it is possible that the directory of the filename doesn't exist either, in such case it must be created. For example, if the line is "c:\qwerty\[login to view URL]" and the file doesn't exist, the code must first check if "c:\qwerty" directory exists, if it doesn't, it is created, and after that an empty "[login to view URL]" is created to the directory. After VerifyExtList has been gone through, the class will go through the VerifyAttribList. It too contains a list of filenames and paths. The given filenames and paths may or may not exist. If the input line is a filename, the class will verify that the file doesn't have the ReadOnly attribute set. If it is set, the attribute is removed. If the input line is a directory path, the class will check that all the files in this directory (not the sub-directories) do not have the ReadOnly attribute set. If any such file is found, the attribute is removed. The class must provide a mechanism for the main program thread to wait for the thread's completion. For example, the main program thread could do While [login to view URL]() do [login to view URL]; which would break when the thread has processed both the input lists. Note: It is possible that either of the input lists contains filenames or paths that point to a disk drive that cannot be modified (e.g. a cd-rom) and thus the content cannot be changed (e.g. it's not possible to create a new directory to a cd-rom). In such case, the class must simply proceed to the next line of the input list without raising an exception and without Windows showing any error messages.
Project ID: 4085084

About the project

2 proposals
Remote project
Active 11 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
Hello, I am happy to create these classes for you.
$111 USD in 1 day
5.0 (8 reviews)
4.2
4.2
2 freelancers are bidding on average $131 USD for this job
User Avatar
Details in PMB.
$150 USD in 0 day
5.0 (17 reviews)
5.6
5.6

About the client

Flag of THAILAND
Turku, Thailand
5.0
591
Payment method verified
Member since Mar 16, 2011

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.