1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/genericopenlibs/openenvcore/include/utime.dosc Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,74 @@
1.4 +/** @file ../include/utime.h
1.5 +@internalComponent
1.6 +*/
1.7 +
1.8 +/** @struct utimbuf
1.9 +
1.10 +The utimbuf structure is used with the utime function to specify new access and modification times for a file. It contains the following members:
1.11 +
1.12 +@publishedAll
1.13 +@externallyDefinedApi
1.14 +*/
1.15 +
1.16 +/** @var utimbuf::actime
1.17 +Access time
1.18 +*/
1.19 +
1.20 +/** @var utimbuf::modtime
1.21 +Modification time
1.22 +*/
1.23 +
1.24 +/** @fn utime(const char *name, const struct utimbuf *filetimes)
1.25 +@param name
1.26 +@param filetimes
1.27 +@return errno is set appropriately.
1.28 +
1.29 + This interface is obsoleted by utimes.
1.30 +
1.31 +The utime function sets the access and modification times of the named file from the actime and modtime fields of the struct utimbuf pointed at by filetimes.
1.32 +
1.33 +If the times are specified (the timep argument is non- NULL) the caller must be the owner of the file or be the super-user.
1.34 +
1.35 +If the times are not specified (the timep argument is NULL) the caller must be the owner of the file, have permission to write the file, or be the super-user.
1.36 +
1.37 +Examples:
1.38 +@code
1.39 +/* Detailed description: Sample usage of utime system call
1.40 + * Preconditions: Example.txt file should exist in the working directory
1.41 + */
1.42 +#include <stdio.h>
1.43 +#include <utime.h>
1.44 +int main()
1.45 +{
1.46 + struct utimbuf Time ;
1.47 + if(utime("Example.txt" , &Time;) < 0 )
1.48 + {
1.49 + printf("Utime call failed") ;
1.50 + return -1 ;
1.51 + }
1.52 + printf("Utime call succeded") ;
1.53 + return 0 ;
1.54 +}
1.55 +
1.56 +@endcode
1.57 + Output
1.58 +@code
1.59 +Utime call succeded
1.60 +
1.61 +@endcode
1.62 +
1.63 +Limitations:
1.64 +
1.65 +KErrNotReady of Symbian error code is mapped to ENOENT, which typically means drive
1.66 +not found or filesystem not mounted on the drive.
1.67 +
1.68 +@see stat()
1.69 +@see utimes()
1.70 +
1.71 +
1.72 +
1.73 +@capability Deferred @ref RFs::SetModified(const TDesC16&, const TTime&)
1.74 +
1.75 +@publishedAll
1.76 +@externallyDefinedApi
1.77 +*/