Re: [cpp] c语言如何判断一个路径是文件还是文件夹

李辉 xylophone21 at gmail.com
Mon Oct 29 09:22:03 CST 2007


        hff = _findfirst( root, &fileinfo );
        if( hff > 0 )
        {
            printf("Searching files in %s ...\n",root_dir);
            do
            {
                if(fileinfo.attrib & _A_ARCH)
                {
                       .....
                }
            }while( -1 != _findnext(hff,&fileinfo) );

            _findclose( hff );
        }


在07-10-28,Shuo Chen <giantchen at gmail.com> 写道:
>
> GetFileAttributes()
>
> On 10/28/07, hit_pc <hit_pc at 163.com> wrote:
> > cpp:
> >     就是类似于python中的``isdir''函数,找了半天都没有找到.
> > 操作系统是xp,不能使用``S_ISDIR''.
> >
> >     致
> > 礼
> >
> > lichao
> > 20071028
> >
> > --
> > //-------------------------
> > 毫无疑问,
> > 我写的code,
> > 是全世界,
> >  最鲁棒的。
> > _______________________________________________
> > Cpp mailing list
> > Cpp at codingnow.com
> > http://codingnow.com/mailman/listinfo/cpp
> >
> >
>
> _______________________________________________
> Cpp mailing list
> Cpp at codingnow.com
> http://codingnow.com/mailman/listinfo/cpp
>



-- 
同洲 李辉
Tel:0755-26733800-6035(工作时间)/ 0755-26520073(下班时间)
Email:xylophone21 at gmail.com(常用)
MSN:xylophone21 at 163.com(工作时间在线)
GTalk:xylophone21 at gmail.com(工作时间在线)
手机:失窃中&# 8230;请使用以上联系方式
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://codingnow.com/pipermail/cpp/attachments/20071029/1c2b46dd/attachment.html


More information about the Cpp mailing list