root/maint/gnulib/lib/utimens.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


DEFINITIONS

This source file includes following definitions.
  1. lutimensat

   1 /* Set file access and modification times.
   2 
   3    Copyright 2012-2021 Free Software Foundation, Inc.
   4 
   5    This file is free software: you can redistribute it and/or modify
   6    it under the terms of the GNU Lesser General Public License as
   7    published by the Free Software Foundation; either version 3 of the
   8    License, or (at your option) any later version.
   9 
  10    This file is distributed in the hope that it will be useful,
  11    but WITHOUT ANY WARRANTY; without even the implied warranty of
  12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13    GNU Lesser General Public License for more details.
  14 
  15    You should have received a copy of the GNU Lesser General Public License
  16    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
  17 
  18 /* Written by Paul Eggert.  */
  19 
  20 #include <time.h>
  21 int fdutimens (int, char const *, struct timespec const [2]);
  22 int utimens (char const *, struct timespec const [2]);
  23 int lutimens (char const *, struct timespec const [2]);
  24 
  25 #if GNULIB_FDUTIMENSAT
  26 # include <fcntl.h>
  27 # include <sys/stat.h>
  28 
  29 #ifndef _GL_INLINE_HEADER_BEGIN
  30  #error "Please include config.h first."
  31 #endif
  32 _GL_INLINE_HEADER_BEGIN
  33 #ifndef _GL_UTIMENS_INLINE
  34 # define _GL_UTIMENS_INLINE _GL_INLINE
  35 #endif
  36 
  37 int fdutimensat (int fd, int dir, char const *name, struct timespec const [2],
  38                  int atflag);
  39 
  40 /* Using this function makes application code slightly more readable.  */
  41 _GL_UTIMENS_INLINE int
  42 lutimensat (int dir, char const *file, struct timespec const times[2])
     /* [previous][next][first][last][top][bottom][index][help] */
  43 {
  44   return utimensat (dir, file, times, AT_SYMLINK_NOFOLLOW);
  45 }
  46 
  47 _GL_INLINE_HEADER_END
  48 
  49 #endif

/* [previous][next][first][last][top][bottom][index][help] */