Deletes the specified temporary file.
public static bool DeleteTemporaryFile(string fileName)
public static boolean deleteTemporaryFile(java.lang.String string);
public:static bool DeleteTemporaryFile(String^ fileName)
def DeleteTemporaryFile(self,fileName):
fileName
String containing the filename to delete.
true, if the specified temporary file was deleted; otherwise, false.
Use this method to delete temporary files created by RasterDefaults.GetTemporaryFileName.
using Leadtools;using Leadtools.Codecs;public static void DeleteTemporaryFile_Example(){String tempFile = RasterDefaults.GetTemporaryFileName();/* do something with the temp file */RasterDefaults.DeleteTemporaryFile(tempFile); /* Delete tempFile when you are done with it */}
import java.io.File;import java.io.IOException;import java.nio.file.Files;import java.nio.file.Path;import java.nio.file.Paths;import org.junit.*;import org.junit.Test;import org.junit.runner.JUnitCore;import org.junit.runner.Result;import org.junit.runner.notification.Failure;import static org.junit.Assert.*;import leadtools.*;import leadtools.codecs.*;public void rasterDefaultsDeleteTemporaryFileExample() throws IOException {final String LEAD_VARS_IMAGES_DIR = "C:\\LEADTOOLS23\\Resources\\Images";Path tempDir = Paths.get(combine(LEAD_VARS_IMAGES_DIR, "temp\\MyTempFolder"));Files.createDirectories(tempDir);RasterDefaults.setTemporaryDirectory(combine(LEAD_VARS_IMAGES_DIR, "temp\\MyTempFolder"));String myTempFile = RasterDefaults.getTemporaryFileName();// Use the temp file indicated by myTempFile. The file should be in// c:\temp\MyTempFolder instead of the Windows TEMP Folder.// Delete the file when you're done with it.RasterDefaults.deleteTemporaryFile(myTempFile); // Delete tempFile when you are done with it //}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document
