Quote:
i've did some code to read the modified time and copie file in local but i don't know how to do that for remote file in another server
i will not use directory in my program is juste one file shared
Someone needs to send the instructor an email with a link to this thread. She's trying to at least get partial credit according to the marking scheme:
Quote:
Synchronize messages (20%)
- Client sends the sync_messages to the server
- The server compares the times and sends the sync_message back
- Partial credit if this works for at least one file
I'll quote the OP so it can't be deleted.
Quote:
Hello !
Can you please help me to do this program :
get the last modified time of a file on clientA
send a sync_message request to the serverA containing the filename, last modified time.
read a sync_message response from the server containing filename, the server's last modified time for the file on the server.
if the last modified time in the message from the serverA is more recent that the local last modified time
the clientA will read the file from the server one CHUNKSIZE chunk at a time and will replace the local file with the contents from the serverA.
otherwise, the client will send the local file one CHUNKSIZE chunk at a time and will replace the file in the serverA by the client file.
Thank you in advance
Best Regards,
Melissa.
Quote:
First Thank you for your answers
@memcpy : I need a code can connect clientA to a serverA and get modified time of a file (/share/file1.txt) located in serverA, and compare it with modified time of file1 (/share/file1) located in the clientA,
if client_F_M_Time is newer than the server_F_M_Time -> the program replace the file in the server by the new one (client file)
else if server_F_M_Time is newer than the client_F_M_Time -> the program replace the file in client with de new one (server file).
Quote:
i've did some code to read the modified time and copie file in local but i don't know how to do that for remote file in another server
i will not use directory in my program is juste one file shared
Quote:
Can you send me a code to connect clientA to serverA ?
Quote:
Ok if you can't, stop answering me
some one can help me please ?