Beispiel #1
0
        public void DeleteFile()
        {
            watcher.Stop();
            FileInfo fileInfo = new FileInfo(fileName);

            fileInfo.Delete();

            FileInfo temp = new FileInfo(tempFileName);

            if (temp.Exists)
            {
                temp.Delete();
            }
        }
        public void DeleteFile()
        {
            if (Environment.OSVersion.Platform != System.PlatformID.Win32NT)
            {
                return;
            }

            watcher.Stop();
            FileInfo fileInfo = new FileInfo(fileName);

            fileInfo.Delete();

            FileInfo temp = new FileInfo(tempFileName);

            if (temp.Exists)
            {
                temp.Delete();
            }
        }