Esempio n. 1
0
        /// <summary>
        /// Returns false if VS registers the file as not saved (asterisk by the name of the file)
        /// </summary>
        public static bool IsFileSaved(string path)
        {
            if (string.IsNullOrEmpty(path))
            {
                throw new ArgumentNullException("path");
            }

            bool open = DTE.get_IsOpenFile(null, path);

            return(!open || DTE.Documents.Item(path).Saved);
        }