搜索文件 [英] search for files

查看:48
本文介绍了搜索文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

可以任何人编写一个C代码来搜索目录中的文件

而不使用windows apis(FindFirstFile()和FindNextFile())

甚至对如何做到这一点有一个小想法。

谢谢。

hi there
can any one write a C code that search for files in a directory
without using the windows apis(FindFirstFile() and FindNextFile())
or even has a small idea on how to do that.
thanks.

推荐答案

Jrdman写道:
Jrdman wrote:

嗨那里

可以任何人写一个C代码来搜索目录中的文件

不使用windows apis(FindFirstFile()和FindNextFile())

甚至对如何做到这一点有一个小小的想法。

谢谢。
hi there
can any one write a C code that search for files in a directory
without using the windows apis(FindFirstFile() and FindNextFile())
or even has a small idea on how to do that.
thanks.



No.

我为此目的使用MSDN库。


-

pete

No.
I use the MSDN library for that purpose.

--
pete


文章< f7 ********************** ************ @ y21g2000hsf。 googlegroups.com>,

Jrdman<啊********* @ gmail.comwrote:
In article <f7**********************************@y21g2000hsf. googlegroups.com>,
Jrdman <ah*********@gmail.comwrote:

> hi有没有人可以编写一个C代码来搜索目录中的文件
而不使用windows apis(FindFirstFile()和FindNextFile())
甚至对如何获得一个小小的想法去做。
>hi there
can any one write a C code that search for files in a directory
without using the windows apis(FindFirstFile() and FindNextFile())
or even has a small idea on how to do that.



我想在非MS Windows系统上使用Windows API相当无用

,所以如果我们理解它那个

人们确实能够在至少一个非MS Windows系统上编写代码来搜索

a目录中的文件,然后回答

你的问题在逻辑上必须是是。

你可能会发现阅读最近的线程目录

由'sid'开头是有益的''6月27日,
http: //groups.google.ca/group/comp.l...23538a011bd637

-

问:为什么鸡穿过莫比乌斯带?


答:有多种原因。

I would imagine that using the Windows APIs would be fairly useless
on non- MS Windows systems, so if we take it as understood that
people have indeed been able to write code to search for files in
a directory on at least one non- MS Windows system, then the answer
to your question would logically have to be "Yes".
You might find it instructive to read the recent thread "directories"
started by ''sid'' on June 27th,
http://groups.google.ca/group/comp.l...23538a011bd637
--
Q: Why did the chicken cross the Mobius strip?

A: There were manifold reasons.


" Jrdman" <啊********* @ gmail.com在消息新闻中写道:
"Jrdman" <ah*********@gmail.comwrote in message news:

任何人都可以写一个搜索目录中文件的C代码

没有使用windows apis(FindFirstFile()和FindNextFile())

甚至对如何做到这一点有一个小想法。
can any one write a C code that search for files in a directory
without using the windows apis(FindFirstFile() and FindNextFile())
or even has a small idea on how to do that.



No.

ANSI C没有目录功能,乍一看似乎令人惊讶

因为有从路径打开文件的功能。

然而,在许多系统上,目录可能非常大,并且可以通过

其他用户进行更改。这样就很难设计一个强大的界面

,它将适用于每个系统。

因此你必须使用特定于操作系统的功能。

-

免费游戏和编程好东西。
http://www.personal.leeds.ac.uk/~bgy1mm

No.
ANSI C has no directory functions, which at first sight may seem surprising
since there are fucntions to open files from paths.
However on many systems directories can be very large, and can be altered by
other users. This makes it quite difficult to devise a robust interface
which will hold for every system.
Thus you have to use OS-specific functions.

--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm


这篇关于搜索文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆