OSDN Git Service

b9316aa726beb2521b6e3eac8892e9f99259b104
[linuxjm/LDP_man-pages.git] / draft / 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 .\"*******************************************************************
26 .\"
27 .\" This file was generated with po4a. Translate the source file.
28 .\"
29 .\"*******************************************************************
30 .TH FUTIMES 3 2008\-04\-07 Linux "Linux Programmer's Manual"
31 .SH 名前
32 futimes, lutimes \- ファイルのタイムスタンプを変更する
33 .SH 書式
34 .nf
35 \fB#include <sys/time.h>\fP
36
37 \fBint futimes(int \fP\fIfd\fP\fB, const struct timeval \fP\fItv\fP\fB[2]);\fP
38
39 \fBint lutimes(const char *\fP\fIfilename\fP\fB, const struct timeval \fP\fItv\fP\fB[2]);\fP
40 .fi
41 .sp
42 .in -4n
43 glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
44 .in
45 .sp
46 \fBfutimes\fP(), \fBlutimes\fP(): _BSD_SOURCE
47 .SH 説明
48 \fBfutimes\fP()  は \fButimes\fP(2)  と同じ方法でファイルのアクセス時刻と修正時刻を変更する。
49 違いは、タイムスタンプを変更するファイルを、 パス名ではなく、ファイルディスクリプタ \fIfd\fP を用いて指定する点である。
50
51 \fBlutimes\fP()  は \fButimes\fP(2)  と同じ方法でファイルのアクセス時刻と修正時刻を変更する。 違いは、 \fIfilename\fP
52 がシンボリック・リンクを参照している場合に、リンクの展開を行わず、 代わりにシンボリック・リンクのタイムスタンプを変更する。
53 .SH 返り値
54 成功した場合は 0 が返される。エラーの場合は \-1 が返され、 \fIerrno\fP が適切に設定される。
55 .SH エラー
56 エラーは \fButimes\fP(2)  と同じだが、 \fBfutimes\fP()  では以下のエラーが追加になっている:
57 .TP 
58 \fBEBADF\fP
59 \fIfd\fP が有効なファイルディスクリプタでない。
60 .TP 
61 \fBENOSYS\fP
62 \fI/proc\fP ファイルシステムにアクセスできなかった。
63 .SH バージョン
64 \fBfutimes\fP()  は glibc 2.3 以降で利用可能である。 \fBlutimes\fP()  は glibc 2.6 以降で利用可能であり、
65 \fButimensat\fP(2)  システムコールを使って実装されている。 \fButimensat\fP(2)  はカーネル 2.6.22
66 以降でサポートされている。
67 .SH 準拠
68 これらの関数はどの標準でも規定されていない。 Linux 以外では、これらは BSD でのみ利用可能である。
69 .SH 関連項目
70 \fButime\fP(2), \fButimensat\fP(2), \fBsymlink\fP(7)