.\" Hey Emacs! This file is -*- nroff -*- source. .\" .\" Copyright (c) 2006, 2008, Michael Kerrisk .\" .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" .\" Japanese Version Copyright (c) 2006 Akihiro MOTOKI all rights reserved. .\" Translated 2006-07-31, Akihiro MOTOKI .\" Updated 2008-08-07, Akihiro MOTOKI, LDP v3.05 .\" .\"WORD: access time アクセス時刻 .\"WORD: modification time 修正時刻 .\" .TH FUTIMES 3 2008-04-07 "Linux" "Linux Programmer's Manual" .SH 名前 futimes, lutimes \- ファイルのタイムスタンプを変更する .SH 書式 .nf .B #include .BI "int futimes(int " fd ", const struct timeval " tv [2]); .BI "int lutimes(const char *" filename ", const struct timeval " tv [2]); .fi .sp .in -4n glibc 向けの機能検査マクロの要件 .RB ( feature_test_macros (7) 参照): .in .sp .BR futimes (), .BR lutimes (): _BSD_SOURCE .SH 説明 .BR futimes () は .BR utimes (2) と同じ方法でファイルのアクセス時刻と修正時刻を変更する。 違いは、タイムスタンプを変更するファイルを、 パス名ではなく、ファイルディスクリプタ .I fd を用いて指定する点である。 .BR lutimes () は .BR utimes (2) と同じ方法でファイルのアクセス時刻と修正時刻を変更する。 違いは、 .I filename がシンボリック・リンクを参照している場合に、リンクの展開を行わず、 代わりにシンボリック・リンクのタイムスタンプを変更する。 .SH 返り値 成功すると 0 を返す。エラーの場合 \-1 を返し、 .I errno を適切に設定する。 .SH エラー エラーは .BR utimes (2) と同じだが、 .BR futimes () では以下のエラーが追加になっている: .TP .B EBADF .I fd が有効なファイルディスクリプタでない。 .TP .B ENOSYS .I /proc ファイルシステムにアクセスできなかった。 .SH バージョン .BR futimes () は glibc 2.3 以降で利用可能である。 .BR lutimes () は glibc 2.6 以降で利用可能であり、 .BR utimensat (2) システムコールを使って実装されている。 .BR utimensat (2) はカーネル 2.6.22 以降でサポートされている。 .SH 準拠 これらの関数はどの標準でも規定されていない。 Linux 以外では、これらは BSD でのみ利用可能である。 .SH 関連項目 .BR utime (2), .BR utimensat (2), .BR symlink (7)