📄 utime.c
字号:
/* *---------------------------------------------------------------------- * T-Kernel / Standard Extension * * Copyright (C) 2006 by Ken Sakamura. All rights reserved. * T-Kernel / Standard Extension is distributed * under the T-License for T-Kernel / Standard Extension. *---------------------------------------------------------------------- * * Version: 1.00.00 * Released by T-Engine Forum(http://www.t-engine.org) at 2006/8/11. * *---------------------------------------------------------------------- *//* * @(#)opendir.c (libg) * * Directory operation * * Use "SEIO" */#include <basic.h>#include <tk/tkernel.h>#include <seio/sys/types.h>#include <seio/sys/time.h>#include <seio/utime.h>#include <errno.h>#include "sfimport.h"IMPORT int utimes( const char *path, const struct timeval times[2] );EXPORT int utime( const char *file, const struct utimbuf *timep ){ struct timeval *tm, timev[2]; if ( timep == NULL ) { tm = NULL; } else { tm = timev; tm[0].tv_sec = timep->actime; /* * Open directory * Open the directory indicated by "path", and position it in the first directory entry. * Return value != "NULL" normal (return the access handle) * = "NULL" error (set "errno") */ tm[0].tv_usec = 0; tm[1].tv_sec = timep->modtime; /* Open the directory */ tm[1].tv_usec = 0; } return utimes(file, tm);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -