示例#1
0
文件: FSDrive.cs 项目: WishSummer/FS
        public DokanError FindFiles(string fileName, out IList<FileInformation> files, DokanFileInfo info)
        {
            //Console.WriteLine("FindFiles: {0}", fileName);

            var ret = new List<FileInformation>();
            var dir = new Directory(fileName);

            if (!dir.Exists())
            {
                files = null;
                return DokanError.ErrorPathNotFound;
            }

            var list = dir.ListDirectory();
            foreach (var item in list)
            {
                ret.Add(item.GetFileInformation());
            }

            files = ret;
            return DokanError.ErrorSuccess;
        }