Пример #1
0
 public static void DeleteIfExistsAndCreateDirectory(this IShell shell, AbsoluteDirectoryPath directory)
 {
     if (shell.Exists(directory))
     {
         shell.Delete(directory);
     }
     shell.Create(directory);
 }
Пример #2
0
        public string GetUserWhoRanDaemonLastTime()
        {
            try
            {
                if (!_fs.Exists(_userFile))
                {
                    return(GetUserName());
                }

                return(_fs.ReadAllText(_userFile, 10));
            }
            catch (ArgumentException e)
            {
                _errorWriter.WriteLine(e.InnerException);
                return(GetUserName());
            }
            catch (Exception e)
            {
                _errorWriter.WriteLine(e);
                return(GetUserName());
            }
        }
Пример #3
0
 bool HasCustomDevicesFile(AbsoluteDirectoryPath projDir)
 {
     return(_fileSystem.Exists(CustomDevicesFile(projDir)));
 }