deprecated/etouch/etouch.cpp
changeset 607 378360dbbdba
parent 600 6d08f4a05d93
child 675 02e65118a746
equal deleted inserted replaced
591:22486c9c7b15 607:378360dbbdba
       
     1 // Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #if defined(__MSVCDOTNET__) || defined (__TOOLS2__)
       
    17  #include <iostream>
       
    18  using namespace std;
       
    19 #else //!__MSVCDOTNET__
       
    20  #include <iostream.h>
       
    21 #endif //__MSVCDOTNET__
       
    22 
       
    23 #if defined(__VC32__) || defined(__TOOLS2__)
       
    24  #include <sys\utime.h>
       
    25 #else
       
    26  #include <utime.h>
       
    27 #endif
       
    28 
       
    29 #if defined(__VC32__) && !defined(__MSVCDOTNET__)
       
    30 #pragma warning( disable : 4710 )	// 'fn': function not inlined
       
    31 #endif // old MSVC
       
    32 
       
    33 int main(int argc,char *argv[])
       
    34 //
       
    35 // Collect the filename from the command line
       
    36 // and change its date/time stamp to the current date/time
       
    37 //
       
    38 	{
       
    39 
       
    40 	if (argc!=2)
       
    41 		{
       
    42 		cout << "Syntax: etouch filename" << endl;
       
    43 		return(1);
       
    44 		}
       
    45 	return(utime(argv[1],NULL)==(-1) ? 1 : 0);
       
    46 	}