Skip to content

Latest commit

 

History

History
33 lines (20 loc) · 1.89 KB

File metadata and controls

33 lines (20 loc) · 1.89 KB

VFSAdvancedExtensions.TryCreateFileWithDirectories(this IVirtualFileSystem, string, string) Method

Safely creates a file and automatically creates any missing parent directories.

public static bool TryCreateFileWithDirectories(this Atypical.VirtualFileSystem.Core.Contracts.IVirtualFileSystem vfs, string filePath, string? content=null);

Parameters

vfs IVirtualFileSystem

The virtual file system.

filePath System.String

The file path as a string.

content System.String

The file content.

Returns

System.Boolean
True if the file and directories were created successfully, false otherwise.