Esempio n. 1
0
        /// <summary>
        /// Create & verify each directory
        /// </summary>
        /// <returns>False if one of the directories did not create</returns>
        public static bool Initialize()
        {
            Type classType = typeof(DirectoryLocations);

            foreach (PropertyInfo propertyInfo in classType.GetProperties())
            {
                //if (propertyInfo.PropertyType != typeof(string)) continue; // only get string properties
                string path = propertyInfo.GetValue(null).ToString(); // get path
                if (!IoHelperMethods.DirectoryExists(path) && !IoHelperMethods.CreateDirectory(path))
                {
                    return(false);
                }
            }
            return(true);
        }