Exemple #1
0
 public static void DeleteIfExistsAndCreateDirectory(this IShell shell, AbsoluteDirectoryPath directory)
 {
     if (shell.Exists(directory))
     {
         shell.Delete(directory);
     }
     shell.Create(directory);
 }
Exemple #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());
            }
        }
Exemple #3
0
 bool HasCustomDevicesFile(AbsoluteDirectoryPath projDir)
 {
     return(_fileSystem.Exists(CustomDevicesFile(projDir)));
 }