//IEnvironment env; public ImplHandlerLog(IEnvironment pEnv) { // env = pEnv; try { if (!ToolMobile.existsDir(_dir)) { ToolMobile.createDir(_dir); } string[] arr = ToolMobile.getFiles(_dir); if (arr.Length > 30) { List <string> files = new List <string>(arr); files.Sort(); for (int i = 0; i < files.Count - 5; ++i) { ToolMobile.deleteFile(_dir, files[i]); } } } catch //(Exception exc) { } }
public override string[] getFiles(string dir) { string path = correctPath(dir, string.Empty); // string[] arr = ToolMobile.getFiles(path); for (int i = 0; i < arr.Length; ++i) { arr[i] = Path.GetFileName(arr[i]); } return(arr); }