What do you want to save?
Add Code snippet
New code examples
-
C# 2021-11-06 08:42:07
c# create a text file
//File and path you want to create and write to string fileName = @"C:\Temp\Temp.txt"; //Check if the file exists if (!File.Exists(fileName)) { // Create the file and use streamWriter to write text to it. //If the file existence is not ch... Add solution -
C# 2021-10-27 17:18:11
how to create empty text file in c#
using (File.Create(filename)) ; Add solution -
Other 2021-10-14 03:13:04
How to create a virtual floppy disk:
using (FileStream fs = File.Create(@"myfloppy.vfd")) { using (FatFileSystem floppy = FatFileSystem.FormatFloppy(fs, FloppyDiskType.HighDensity, "MY FLOPPY ")) { using (Stream s = floppy.OpenFile("foo.txt", Fi... Add solution -
Java 2021-09-26 06:00:03
how to copy all files and subdirectories in directory in java
public static void storeFile(String path, File file) { try { File newFile = new File(path); newFile.createNewFile(); Files.copy(file.toPath(), newFile.toPath(), StandardCopyOption.REPLACE_EXISTING); } catch (Exception e) { e.printStackTra... Add solution -
Other 2021-09-20 00:50:01
How to create a virtual hard disk:
long diskSize = 30 * 1024 * 1024; //30MB using (Stream vhdStream = File.Create(@"C:\TEMP\mydisk.vhd")) { Disk disk = Disk.InitializeDynamic(vhdStream, diskSize); BiosPartitionTable.Initialize(disk, WellKnownPartitionType.WindowsFat); ... Add solution