遍历symbian某目录下的所有文件

遍历symbian某目录下的所有文件

ID:22739358

大小:76.50 KB

页数:11页

时间:2018-10-31

遍历symbian某目录下的所有文件_第1页
遍历symbian某目录下的所有文件_第2页
遍历symbian某目录下的所有文件_第3页
遍历symbian某目录下的所有文件_第4页
遍历symbian某目录下的所有文件_第5页
资源描述:

《遍历symbian某目录下的所有文件》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库

1、遍历Symbian某目录下的所有文件  遍历Symbian某目录下的所有文件应该是Symbian中常用到的功能模块,比如你想写一个类似程序管理器的程序,那么首先的任务就是要先知道某目录下到底有那些文件,然后再筛选出你所需要的文件。  遍历Symbian某目录下的所有文件有两种方法  ① 我们首先学习点预备知识  查看SDKHELP中的GetDir()方法,你会看到如下的内容:  GetDir()  TIntGetDir(constTDesCaName,TUintanEntryAttMask,TUintanEntrySortKey,CDir*anEntryList)co

2、nst;  Description  Getsafilteredlistofadirectory'scontents.Thebitmaskdeterminesinestheorderinationemoryforitbeforeappendingentriestothelist.Therefore,anEntryListshouldhavenomemoryallocatedtoitbeforethisfunctioniscalled,otheremoryeters  constTDesCaName  Nameofthedirectoryforaybeusedt

3、ospecifyparticularfiles.  TUintanEntryAttMask  Bitmaskindicatingtheattributesofinterest.Onlyfilesanddirectoriesatchthosespecifiedherecanbeincludedinthelisting.FormoreinformationseeKEntryAttMatchMaskandtheotherdirectoryentrydetails.AlsoseeKEntryAttNormalandtheotherfileordirectoryattribut

4、es.  TUintanEntrySortKey  Flagindicatingtheorderinp;anEntryList  Onreturncontainsalistofdirectoryandfileentries.  Returnvalue  TInt  KErrNoneifsuccessful,other-5.0  Description  Arrayofdirectoryentriesthathasbeenreadintomemoryfromthefilesystemabstractbaseclass.Itcanbereadandsortedbyuser

5、programs,butcannotbecreatedbythem.  Thisclassisnotintendedforuserderivation.    o  CBase-Baseclassforallclassestobeinstantiatedontheheap    §    CDir-Arrayofdirectoryentriesthathasbeenreadintomemoryfromthefilesystemabstractbaseclass    Members    DefinedinCDir:    Count(),NeCBase: 

6、   operatornep;operator[](TIntanIndex)const;    Description    Returnsanentryfromthearray.    Parameters    TIntanIndex    Indexofthedesiredentryp;    Adirectoryentry.  可以看出,通过[]操作符,CDir指针返回给我们的是一个目录的封装类TEntry。  我们可以再跟踪一下TEntry这个类的SDKHELP:  ClassTEntry  TEntry  Support  Supportedfrom5.0

7、  Description  Encapsulatesanentryinadirectory,elabel.Eachdirectoryentryhasanameiddot;    thekindofentry:storedintheentryUIDs,storediniType(项的类型:储存在UIDs和iType中)      theentryattributes,storediniAtt(项的属性:储存在iAtt中)      thesizeofentry(项的尺寸)      thetimetheentryodified(项上次被修改的时间) 

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。