OSDN Git Service

e95ef985217ef6449fed3990bde0e278b661ef4b
[linuxjm/LDP_man-pages.git] / release / man3 / futimes.3
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\"
3 .\" Copyright (c) 2006, 2008, Michael Kerrisk
4 .\"
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
8 .\"
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
13 .\"
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein.  The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
20 .\" professionally.
21 .\"
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
24 .\"
25 .\" Japanese Version Copyright (c) 2006 Akihiro MOTOKI all rights reserved.
26 .\" Translated 2006-07-31, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
27 .\" Updated 2008-08-07, Akihiro MOTOKI, LDP v3.05
28 .\"
29 .\"WORD:        access time             アクセス時刻
30 .\"WORD:        modification time       修正時刻
31 .\"
32 .TH FUTIMES 3 2008-04-07 "Linux" "Linux Programmer's Manual"
33 .SH 名前
34 futimes, lutimes \- ファイルのタイムスタンプを変更する
35 .SH 書式
36 .nf
37 .B #include <sys/time.h>
38
39 .BI "int futimes(int " fd ", const struct timeval " tv [2]);
40
41 .BI "int lutimes(const char *" filename ", const struct timeval " tv [2]);
42 .fi
43 .sp
44 .in -4n
45 glibc 向けの機能検査マクロの要件
46 .RB ( feature_test_macros (7)
47 参照):
48 .in
49 .sp
50 .BR futimes (),
51 .BR lutimes ():
52 _BSD_SOURCE
53 .SH 説明
54 .BR futimes ()
55
56 .BR utimes (2)
57 と同じ方法でファイルのアクセス時刻と修正時刻を変更する。
58 違いは、タイムスタンプを変更するファイルを、
59 パス名ではなく、ファイルディスクリプタ
60 .I fd
61 を用いて指定する点である。
62
63 .BR lutimes ()
64
65 .BR utimes (2)
66 と同じ方法でファイルのアクセス時刻と修正時刻を変更する。
67 違いは、
68 .I filename
69 がシンボリック・リンクを参照している場合に、リンクの展開を行わず、
70 代わりにシンボリック・リンクのタイムスタンプを変更する。
71 .SH 返り値
72 成功すると 0 を返す。エラーの場合 \-1 を返し、
73 .I errno
74 を適切に設定する。
75 .SH エラー
76 エラーは
77 .BR utimes (2)
78 と同じだが、
79 .BR futimes ()
80 では以下のエラーが追加になっている:
81 .TP
82 .B EBADF
83 .I fd
84 が有効なファイルディスクリプタでない。
85 .TP
86 .B ENOSYS
87 .I /proc
88 ファイルシステムにアクセスできなかった。
89 .SH バージョン
90 .BR futimes ()
91 は glibc 2.3 以降で利用可能である。
92 .BR lutimes ()
93 は glibc 2.6 以降で利用可能であり、
94 .BR utimensat (2)
95 システムコールを使って実装されている。
96 .BR utimensat (2)
97 はカーネル 2.6.22 以降でサポートされている。
98 .SH 準拠
99 これらの関数はどの標準でも規定されていない。
100 Linux 以外では、これらは BSD でのみ利用可能である。
101 .SH 関連項目
102 .BR utime (2),
103 .BR utimensat (2),
104 .BR symlink (7)