home *** CD-ROM | disk | FTP | other *** search
- ********************
-
- FUNCTION Readdate
-
- PARAMETERS _file
-
- * take the _file and the _date and write the _date
- * to the back end of the _file, makring the file with
- * the _date and a special code: ddddddddxxxxxSJSD
-
- IF PCOUNT() != 1
- RETURN(.F.)
- ELSEIF TYPE("_file") != "C"
- RETURN(.F.)
- ELSEIF !FILE(_file)
- RETURN(.F.)
- ENDIF
-
- PRIVATE _fhandle, _date, _temp
-
- _fhandle = FOPEN(_file, 2)
-
- FSEEK(_fhandle, -6, 2)
-
- _temp = FREADSTR(_fhandle, 4)
-
- IF _temp != "SJSD"
- && we have an error
- RETURN(CTOD(" / / "))
- ENDIF
- FSEEK(_fhandle, -4, 1) && To get back to the original position
- FSEEK(_fhandle, -10, 1) && Ignor the lenght: I know it
- FSEEK(_fhandle, -8, 1)
- _date = CTOD(FREADSTR(_fhandle, 8))
- FCLOSE(_fhandle)
- RETURN(_date)
-
- * End of File
-
-