示例#1
0
        private dtoCSVfile GetCurrentFile(String filePath)
        {
            List <dtoFileSystemInfo> files = new List <dtoFileSystemInfo>();

            ContentOf.Directory(filePath, ref files, "*.csv.stored");

            dtoFileSystemInfo LastFile = files.OrderByDescending(f => f.CreationTime).Where(f => f.Exists).FirstOrDefault();

            return(GetCsvFile(LastFile));
        }
        private void ClearPreviousFiles(String filePath)
        {
            List <dtoFileSystemInfo> files = new List <dtoFileSystemInfo>();

            ContentOf.Directory(filePath, ref files, "*.csv.stored");
            foreach (dtoFileSystemInfo file in files)
            {
                Delete.File(file.FullName);
            }
        }