    # File lib/chef/provider/remote_directory.rb, line 64
          def purge_unmanaged_files(unmanaged_files)
            if @new_resource.purge
              unmanaged_files.sort.reverse.each do |f|
                # file_class comes from Chef::Mixin::FileClass
                if ::File.directory?(f) && !Chef::Platform.windows? && !file_class.symlink?(f.dup)
                  # Linux treats directory symlinks as files
                  # Remove a directory as a directory when not on windows if it is not a symlink
                  purge_directory(f)
                elsif ::File.directory?(f) && Chef::Platform.windows?
                  # Windows treats directory symlinks as directories so we delete them here
                  purge_directory(f)
                else
                  converge_by("delete unmanaged file #{f}") do
                    ::File.delete(f)
                    Chef::Log.debug("#{@new_resource} deleted file #{f}")
                  end
                end
              end
            end
          end