Ejemplo n.º 1
0
        private string CreateBoxCacheFile()
        {
            var boxHome = _boxHome.GetBoxHomeDirectoryPath();
            var path    = Path.Combine(boxHome, _boxHomeCacheFileName);

            if (!CheckIfBoxCacheFileExists())
            {
                using (var fs = File.Create(path))
                {
                    return(path);
                }
            }
            else
            {
                return(path);
            }
        }
Ejemplo n.º 2
0
        private string CreateBoxHomeSettingsFile()
        {
            var boxHome = _boxHome.GetBoxHomeDirectoryPath();
            var path    = Path.Combine(boxHome, _boxHomeSettingsFileName);

            if (!File.Exists(path))
            {
                File.Create(path).Dispose();
                SerializeBoxHomeSettingsFile(new BoxHomeDefaultSettings());
                return(path);
            }
            else
            {
                return(path);
            }
        }
Ejemplo n.º 3
0
        private string CreateOrReturnBoxEnvironmentFile()
        {
            var boxHome = _boxHome.GetBoxHomeDirectoryPath();
            var path    = Path.Combine(boxHome, _boxHomeEnvironmentsFileName);

            if (!File.Exists(path))
            {
                File.Create(path).Dispose();
                var emptyEnv = new EnvironmentsModel();
                SerializeBoxEnvironmentFile(emptyEnv);
                return(path);
            }
            else
            {
                return(path);
            }
        }