public virtual string createRandomFile(string fileDirectory, string fileName, string fileExtension, litleTime litleTime) { string filePath = null; if (fileName == null || fileName == String.Empty) { if (!Directory.Exists(fileDirectory)) { Directory.CreateDirectory(fileDirectory); } fileName = litleTime.getCurrentTime("MM-dd-yyyy_HH-mm-ss-ffff_") + RandomGen.NextString(8); filePath = fileDirectory + fileName + fileExtension; using (FileStream fs = new FileStream(filePath, FileMode.Create)) { } } else { filePath = fileDirectory + fileName; } return(filePath); }
public virtual string createRandomFile(string fileDirectory, string fileName, string fileExtension, litleTime litleTime) { string filePath = null; if (fileName == null || fileName == string.Empty) { fileName = litleTime.getCurrentTime("MM-dd-yyyy_HH-mm-ss-ffff_") + RandomGen.NextString(8); filePath = fileDirectory + fileName + fileExtension; } else { filePath = fileDirectory + fileName; } if (_cache.ContainsKey(filePath)) { _cache[filePath] = new StringBuilder(); } else { _cache.Add(filePath, new StringBuilder()); } return filePath; }
public virtual string createRandomFile(string fileDirectory, string fileName, string fileExtension, litleTime litleTime) { string filePath; if (string.IsNullOrEmpty(fileName)) { if (!Directory.Exists(fileDirectory)) { Directory.CreateDirectory(fileDirectory); } fileName = litleTime.getCurrentTime("MM-dd-yyyy_HH-mm-ss-ffff_") + RandomGen.NextString(8); filePath = fileDirectory + fileName + fileExtension; using (new FileStream(filePath, FileMode.Create)) { } } else { filePath = fileDirectory + fileName; } return filePath; }
public virtual string createRandomFile(string fileDirectory, string fileName, string fileExtension, litleTime litleTime) { string filePath = null; if (fileName == null || fileName == string.Empty) { fileName = litleTime.getCurrentTime("MM-dd-yyyy_HH-mm-ss-ffff_") + RandomGen.NextString(8); filePath = fileDirectory + fileName + fileExtension; } else { filePath = fileDirectory + fileName; } if (_cache.ContainsKey(filePath)) { _cache[filePath] = new StringBuilder(); } else { _cache.Add(filePath, new StringBuilder()); } return(filePath); }