We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi all, Can any one tell how to implement search command for data search from compact flash card?
Thanks for u r early response. Implementing FAT 16 file system. Want a command to search particular file from CF card by giving total path of the file. I am placing a file in a directory. While searching that file I know total path where I placed it. EX: I have a file “test.txt†in \time\min\sec\test.txt I want to get the file test.txt present in given directory path.Implementing the code in c language.
If you are implementing a FAT16 file system, then obviously no one but you can write example code for implementing the underlying code for an fopen() function using your file system?
Locate root directory. Read first cluster. Scan for file name - or first directory in the path of your file name. If not found, locate next cluster of root directory repeat the search.
If file found in root directory, then you are done. If not, locate first cluster of the subdirectory where the file is in. Read in and scan for the file name (or next level of the path).
Repeat the above until you either fail (path or file missing) or you have found the file.
If file is found, then you know the start cluster of the file. The FAT table will contain the chain of clusters to follow. The directory entry will contain the size of the file, which implies the number of clusters used by the file.
thanks for your support