[prev in list] [next in list] [prev in thread] [next in thread] 

List:       twsocket
Subject:    [twsocket] Change request in FtpSrvT
From:       "Fastream Technologies" <fastream () fastream ! com>
Date:       2003-11-27 8:42:44
[Download RAW message or body]

Hello,

I think the following changes will make the CommandMDTM work:

function GetFileAge(cFile : String) : Integer; // by Bruce
var
    nResult : Integer;
    oRec : TSearchRec;
begin
    nResult := FileAge(cFile);

    if((nResult = -1) and DirectoryExists(cFile)) then
    begin
        cFile := ETPD(cFile);
        nResult := FindFirst(cFile,
                             faDirectory,
                             oRec) ;
        if nResult = 0 then
          nResult := oRec.Time
        else
          nResult := -1;
        FindClose(oRec);
    end;

    Result := nResult;
end;

For me and other pros who also need the drive directories, you have to use
the CreateFile() and GetFileSize(). I already had a C++ function for this so
omitting the pascal coding. However, for derived class of TFtpServer to be
able to call the FtpSrvT functions, these must be accessible globally:

...
const
    FtpSrvT_Unit       = 102;
    CopyRight : String = ' FtpSrvT  (c) 1999-2000 F. Piette V1.02 ';

function FileUtcStr(cFileName : String) : String;

function DateTimeToUTC(dtDT : TDateTime) : TDateTime; // this
function TimeDateStr(dDateTime : TDateTime) : String; // and this

{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*}
implementation
...

Francois please acknowledge that you update the code.

Best Regards,

SZ
Fastream Technologies
Developers of NETFile FTP/Web Server
The Ultimate Solution for File Transfer Over the Net
http://www.fastream.com/NETFileServer


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic