Exemplo n.º 1
0
        /// <summary>
        /// Checks if the given file is part of the working set
        /// </summary>
        /// <param name="File">File to check</param>
        /// <returns>True if the file is part of the working set, false otherwise</returns>
        public bool Contains(FileReference File)
        {
            // Generated .cpp files should never be treated as part of the working set
            if (File.HasExtension(".gen.cpp"))
            {
                return(false);
            }

            // Check if the file is read-only
            try
            {
                return(!FileReference.GetAttributes(File).HasFlag(FileAttributes.ReadOnly));
            }
            catch (FileNotFoundException)
            {
                return(false);
            }
        }