FilesToDelete class
namespace: Serenity.Web assembly: Serenity.Net.Services
A container that stores list of file paths to delete (old files) if the upload related operation is successful. If it is not, the old files will be kept while the new files will be deleted.
public class FilesToDelete : List<string>, IDisposable, IFilesToDelete
| parameter | description |
|---|---|
| storage | Upload storage |
Public Members
| name | description |
|---|---|
| FilesToDelete(…) | A container that stores list of file paths to delete (old files) if the upload related operation is successful. If it is not, the old files will be kept while the new files will be deleted. |
| Dispose() | Deletes the new files if KeepNewFiles is not called. |
| KeepNewFiles() | Keeps new files, while removing old files |
| RegisterNewFile(…) | Registers a new file |
| RegisterOldFile(…) | Registers an old file |
Exceptions
| exception | condition |
|---|---|
| ArgumentNullException | storage is null |
Remarks
Creates a new instance of the class
See Also
- interface IFilesToDelete
- Source: FilesToDelete.cs