Table of Contents

Class Files

Namespace
Nucs.JsonSettings
Assembly
Nucs.JsonSettings.dll
public static class Files
Inheritance
Files
Inherited Members

Methods

AttemptOpenFile(FileInfo, FileMode, FileAccess, FileShare, bool)

public static FileStream AttemptOpenFile(this FileInfo file, FileMode filemode = FileMode.Open, FileAccess fileaccess = FileAccess.Read, FileShare fileshare = FileShare.None, bool @throw = false)

Parameters

file FileInfo
filemode FileMode
fileaccess FileAccess
fileshare FileShare
throw bool

Returns

FileStream

AttemptOpenFile(string, FileMode, FileAccess, FileShare, bool)

Attempts to open a file with given arguments.

public static FileStream AttemptOpenFile(string file, FileMode filemode = FileMode.Open, FileAccess fileaccess = FileAccess.Read, FileShare fileshare = FileShare.None, bool @throw = false)

Parameters

file string

path to the file.

filemode FileMode
fileaccess FileAccess
fileshare FileShare
throw bool

Should this be silent and return null on exception or throw?

Returns

FileStream

The filestream. null if UnauthorizedAccess or IOException