[samba-jp:20335] Re: ファイル生成時刻の扱いについて
Takashi SHIRAI
shirai @ unixusers.net
2008年 8月 13日 (水) 19:26:35 JST
$B!!$7$i$$$G$9!#(B
In Message-Id <878wv2gr17.wl%fumiyas @ osstech.jp>
SATOH Fumiyasu <fumiyas @ osstech.jp>$B$5$s(Bwrites:
> $B$5$H$&$U$_$d$9(B @ OSS $B%F%/%N%m%8$G$9!#(B
> * birthtime $B$H(B birthtimensec $B$,N>J}$H$b(B 0
> * birthtime $B$,(B (time_t)-1
> * birthtimensec $B$,(B -1L
$B!!$=$b$=$b(B st_birthtimensec $B$O8+$kI,MW$"$k$N$+$J$!$H;W$C$F$k(B
$B$s$G$9$,$I$&$G$7$g$&!)(Bnsec $BCM$,>r7o$r:81&$9$k$N$O2<5-$N%1!<(B
$B%9$K$J$j$^$9$h$M!#(B
1.st_birthtimensec = -1 $B$+$D(B st_birthtime != -1 $B$N>l9g(B
2.st_birthtime = 0 $B$+$D(B st_birthtimensec != 0 $B$N>l9g(B
$B!!$3$l0J30$N%1!<%9$G$O(B st_birthtime $B$N$_$rH=CG4p=`$K$9$l$P==(B
$BJ,$G$9$+$i!#(B
$B!!(B1. $B$N%1!<%9$OM>$j9M$($K$/$$$N$G$9$,!"$b$7$"$jF@$k$H$7$?$i(B
$B$3$N(B st_birthtime $B$O2?$r;X$7$F$$$k$s$G$7$g$&$+!)L5;k$7$F$7$^(B
$B$C$FK\Ev$K9=$o$J$$!)(B
$B!!Nc$($PJ,2rG=$NLdBj$G(B 1sec $BL$K~$NCM$,<hF@=PMh$J$$4D6-$G$O!"(B
nsec $BCM$N$_L5;k$7$FM_$7$$$H$$$&0UL#$G(B st_birthtimensec $B$N$_(B
-1 $B$K$7$F$7$^$&$H$$$&>u67$OL5$$$s$G$7$g$&$+$M!#(B
$B!!(B2. $B$N%1!<%9$O(B epoch $B$K6K$a$F6a$$(B time stamp $B$G!"$3$N%l%"%1(B
$B!<%9$r5_:Q$9$k$N$,L\E*$@$H;W$$$^$9$,!"8=<BE*$K$O$=$3$^$G94$k(B
$BI,MW$b$J$$$+$H46$8$^$9!#(B
$B!!$=$b$=$b$3$NJU$j$N(B time stamp $BCM$O(B UNIX $BE*$K$O(B valid $B$G$b(B
Windows $BE*$K$O(B invalid (MS-DOS epoch: 1980/1/1) $B$J$N$G!"5_:Q(B
$B$7$F$b;EJ}$J$$$s$8$c$J$$$G$7$g$&$+$M!)(B
> $B$N$$$:$l$+$J$iL58z$J(B birthtime $B$HH=Dj(B ($B$$$:$l$b3:Ev$7$J$1$l$PM-8z(B)$B!"(B
> $B$@$C$?$s$G$9$,!"$I$&$G$9$+$M$'!#K\Ev$O<BAu$K9g$o$;$F(B
> configure $BEy$G @ Z$jBX$($k$N$,%Y%9%H$J$s$@$m$&$1$I!#(B
$B!!<B:]$K$=$&$$$&4D6-$,B8:_$9$k$+$I$&$+$OJL$H$7$F!"(Bnsec $BCM$O(B
$B8+$J$$<BAu$K$7$F$*$$$?J}$,!"(Bst_birthtime $B$7$+<BAu$7$F$$$J$$(B
$B4D6-$K$bBP1~=PMh$k$N$G!"=@Fp @ -$,9b$$$H;W$$$^$9!#(B
$B!!;EMM>e!"(Bnsec $BCM$,(B invalid $B$J>l9g$K(B valid $B$J(B birthtime $BCM$^(B
$B$GL5;k$9$k$3$H$rMW5a$9$k$h$&$J<BAu$C$F9M$($K$/$$$H;W$$$^$9!#(B
$BL5;k$5$;$?$$$J$i(B valid $BCM$rBeF~$7$J$$$G$7$g$&!"IaDL!#(B
> > $B!!(BUTC $B$rJV$7$F$k(B st_birthtime $B$NJ}$O$=$l$G$b9=$o$J$$$H;W$$$^(B
> > $B$9!#40`z$8$c$J$$$K$7$m!"<BMQ>eFC$KLdBj$J$$$G$7$g$&!#(Bepoch $B$K(B
> > $BAL$C$F(B file $B$r:n @ .$9$k%K!<%:$J$s$F$^$:$"$j$^$;$s$7!#(B
>
> $B$b$7CN$C$F$$$k?M$,$$$?$i65$($FM_$7$$$N$G$9$,!"(B
> time_t $B$C$F @ dBP$KId9fIU$- @ 0?t(B (singed) $B$J$s$G$9$+$M(B?
> unsigned $B$J<BAu$O8+$?$3$H$J$$$h$&$J5$$,$9$k!D!#(B
$B!!0lHL$K$O(B signed $B$G$9!#$3$l$OC1$KEAE}E*$K$=$&$J$C$F$$$k$@$1(B
$B$J$s$G$9$,!"(Bmktime(3) $BEy$N(B invalid $BCMH=CG>r7o$r!V(B-1 $B$J$i!W$G(B
$B$O$J$/$F!VIi?t$J$i!W$H$9$k<BAu$r5_:Q$9$k0UL#$b$"$j$^$9!#(B
$B!!$7$+$7!";EMM>e$O(B -1 $B0J30$O(B valid $BCM$J$N$G!"(B2038 $BG/LdBj$r>/(B
$B$7$G$b @ h1d$P$7$K$9$Y$/(B time_t $B$r(B unsigned $B$K$7$F$"$k4D6-$b4v(B
$B$i$+$OB8:_$7$^$9!#(B
$B!!(BDEC C $B$,$=$&$i$7$$$N$G(B OSF/1 $B$O(B unsigned $B$J$s$@$H;W$$$^$9!#(B
testdrive $B$,(B Digital UNIX $B$r%5%]!<%H$7$F$?:"$K3NG'$7$F$*$1$P(B
$BNI$+$C$?$+$J!<!#(B
$B!!$"$H$O0U30$J$H$3$m$G(B MS-C (VC++) $B$,$=$&$_$?$$$G$9$M!#$G$b(B
$B$3$A$i$O(B epoch $B$,(B 1899/1/1 $B$@$=$&$GM>$j;29M$K$J$j$^$;$s!#2?(B
$B$7$?$$$s$@$m!)(B
> > $B!!(Bnsec $BCM$=$N$b$N$OITMW$G$"$k$H$$$&E@$K4X$7$F$OC/$b0[O@$J$$(B
> > $B$H;W$$$^$9$h!#(B
>
> Windows (SMB?) $B$N%U%!%$%k$N;~9o@:EY$O(B 100ns $B$_$?$$$G$9$+$i!"(B
> $BITMW$C$F$3$H$O$J$$$G$9$M!#(B
$B!!$s!<!"$G$b7o$N(B patch $B$rEv$F$?2U=j$N4X?t$O(B time_t $B$rJV$9$N(B
$B$G!"(Bnsec $BCM$r;H$*$&$H$7$?$i$b$C$HH4K\E*$J2~B$$,I,MW$K$J$j$^(B
$B$9$h!#(B
$B$7$i$$(B $B$?$+$7(B
samba-jp メーリングリストの案内