作者ilway25 (锅烧手)
看板b96902HW
标题Re: [系程] 作业二
时间Tue Apr 28 12:23:51 2009
※ 引述《chienwen (健文)》之铭言:
: ※ 引述《wfuny (KuanYu)》之铭言:
: : 1.有可能出现直接file的Loop吗
: : 如下
: : A->B
: : B->A
: 有可能。
: : 2.有可能要找的档案名是被别人link到的,但不在原来path下的吗??
: : 如下
: : HOME directory 下有 A
: : A--> apple_tomato (apple_tomato 不在 HOME directory)
: 有可能。
所以这种情况下,如果要找 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 ...
: : 3.这次做业是要我们用stat吗?? 还是要用readlink一直读下去??
: 可以自行决定要用什麽函数完成要求
: 通常会用stat家族的函数
: 必要时可能会用到readlink
: 不可以用ftw、nftw、fts等现成的目录traverse函数
: 谢谢:)
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.112.245.11
※ 编辑: ilway25 来自: 140.112.245.11 (04/28 12:40)