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
fileFileInfofilemodeFileModefileaccessFileAccessfileshareFileSharethrowbool
Returns
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
filestringpath to the file.
filemodeFileModefileaccessFileAccessfileshareFileSharethrowboolShould this be silent and return null on exception or throw?
Returns
- FileStream
The filestream. null if UnauthorizedAccess or IOException