Home > Database > Mysql Tutorial > VS2005中,access对只读目录的属性判断不准确

VS2005中,access对只读目录的属性判断不准确

WBOY
Release: 2016-06-07 15:36:43
Original
1011 people have browsed it

只读目录, C:/attrib +A +S +H +R testdir C:/attrib testdir A SHR C:/testdir (1)VC6.0的执行结果: ***********test stat*********************** file [c:/testdir] exists! file [c:/testdir] is directory! file [c:/testdir] can be read! file [c:/

只读目录,
C:/>attrib +A +S +H +R testdir
C:/>attrib testdir
A  SHR     C:/testdir

 

(1)VC6.0的执行结果:
***********test stat***********************
file [c:/testdir] exists!
file [c:/testdir] is directory!
file [c:/testdir] can be read!
file [c:/testdir] can not be writed!

***********test access***********************
file [c:/testdir] exists!
file [c:/testdir] can not be writed!
file [c:/testdir] can be read!

 

(2)VS2005的执行结果
***********test stat***********************
file [c:/testdir] exists!
file [c:/testdir] is directory!
file [c:/testdir] can be read!
file [c:/testdir] can not be writed!

***********test access***********************
file [c:/testdir] exists!
file [c:/testdir] can be writed!
file [c:/testdir] can be read!

 

结论:在VS2005中,使用access判断的只读目录却有【写入】的属性。

         有什么高招,欢迎解答。


建议,在VS2005中对文件、目录进行权限校验时,最好不要用access。

 

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template