genericopenlibs/openenvcore/include/utime.dosc
changeset 0 e4d67989cc36
equal deleted inserted replaced
-1:000000000000 0:e4d67989cc36
       
     1 /** @file  ../include/utime.h
       
     2 @internalComponent
       
     3 */
       
     4 
       
     5 /** @struct utimbuf
       
     6 
       
     7 The utimbuf structure is used with the utime function to specify new access and modification times for a file. It contains the following members:
       
     8 
       
     9 @publishedAll
       
    10 @externallyDefinedApi
       
    11 */
       
    12 
       
    13 /** @var utimbuf::actime
       
    14 Access time 
       
    15 */
       
    16 
       
    17 /** @var utimbuf::modtime
       
    18 Modification time 
       
    19 */
       
    20 
       
    21 /** @fn  utime(const char *name, const struct utimbuf *filetimes)
       
    22 @param name
       
    23 @param filetimes
       
    24 @return   errno is set appropriately.
       
    25 
       
    26   This interface is obsoleted by utimes.
       
    27 
       
    28 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.
       
    29 
       
    30 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.
       
    31 
       
    32 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.
       
    33 
       
    34 Examples:
       
    35 @code
       
    36 /* Detailed description:  Sample usage of utime system call
       
    37  *  Preconditions:  Example.txt file should exist in the working directory
       
    38  */
       
    39 #include <stdio.h>
       
    40 #include <utime.h>
       
    41 int main()
       
    42 {
       
    43   struct utimbuf Time ;
       
    44   if(utime("Example.txt" , &Time;) < 0 ) 
       
    45   {
       
    46      printf("Utime call failed") ;
       
    47      return -1 ;
       
    48   }
       
    49   printf("Utime call succeded") ;
       
    50   return 0 ;
       
    51 }
       
    52 
       
    53 @endcode
       
    54  Output
       
    55 @code
       
    56 Utime call succeded
       
    57 
       
    58 @endcode
       
    59 
       
    60 Limitations:
       
    61 
       
    62 KErrNotReady of Symbian error code is mapped to ENOENT, which typically means drive
       
    63 not found or filesystem not mounted on the drive.
       
    64 
       
    65 @see stat()
       
    66 @see utimes()
       
    67 
       
    68 
       
    69 
       
    70 @capability Deferred @ref RFs::SetModified(const TDesC16&, const TTime&)
       
    71 
       
    72 @publishedAll
       
    73 @externallyDefinedApi
       
    74 */