Exemplo n.º 1
0
        /// <summary>
        /// Registers a file to delete.
        /// </summary>
        public void RegisterFileToDelete(string path)
        {
            ThrowIfDisposed();

            m_pathsToDelete.Add(FileOrDirectoryWrapper.CreateFile(path));
            Interlocked.Increment(ref m_filesPending);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Registers a directory to delete.
        /// </summary>
        /// <remarks>
        /// The contents of registered directory will be deleted. The directory itself will be deleted
        /// if <paramref name="deleteRootDirectory"/> is true.
        /// </remarks>
        public void RegisterDirectoryToDelete(string path, bool deleteRootDirectory)
        {
            ThrowIfDisposed();

            m_pathsToDelete.Add(FileOrDirectoryWrapper.CreateDirectory(path, deleteRootDirectory));
            Interlocked.Increment(ref m_directoriesPending);
        }