作者chienwen (健文)
看板b96902HW
标题Re: [系程] 作业二
时间Tue Apr 28 12:48:08 2009
※ 引述《ilway25 (锅烧手)》之铭言:
: ※ 引述《chienwen (健文)》之铭言:
: : 有可能。
: : 有可能。
: 所以这种情况下,如果要找 apple,
: 我们「一定」要知道 A 是连到 apple_tomato 才能找得到,是这样吗?
: 是的话我就完全误会了................
: That is to say, if a file is a symbolic link, use the file
: information of the referenced file instead of the link file
: itself when implementing the function g.
: 所以这句话的 file information 是包含 filename 吗?
: 我以为如果是 apple_size 连到 B,那麽要取得 B 的 size ...
对的
抱歉没写清楚造成你的误会
file information 是包含 filename
因为具有关键档名的档案只会是regular file
谢谢:)
: : 可以自行决定要用什麽函数完成要求
: : 通常会用stat家族的函数
: : 必要时可能会用到readlink
: : 不可以用ftw、nftw、fts等现成的目录traverse函数
: : 谢谢:)
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.112.31.158
1F:→ ilway25:谢谢!我程式方向完全错了 还好只加了不到20行就能解决.. 04/28 13:17