Click or drag to resize

filePathOperationsgetWritableFile Method

imbSCI | imbACE | imbNLP | imbWEM | imbWBI
Gets writable file based on selected mode. By default it will do overwrite. Autorename calls addUniqueSufix(String, String) extension that counts existing files and sets proper number.

Namespace:  imbSCI.Core.extensions.io
Assembly:  imbSCI.Core (in imbSCI.Core.dll) Version: 0.3.58.
Syntax
C#
public static FileInfo getWritableFile(
	this string path,
	getWritableFileMode mode = getWritableFileMode.overwrite,
	ILogBuilder logger = null
)
Request Example View Source

Parameters

path
Type: SystemString
The path.
mode (Optional)
Type: imbSCI.Data.enumsgetWritableFileMode
The mode.
logger (Optional)
Type: imbSCI.Core.reportingILogBuilder
The logger.

Return Value

Type: FileInfo

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type String. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Exceptions
ExceptionCondition
imbFileExceptiongetWritableFile [" + mode.ToString() + "] failed when directory should be created from [" + dir.toStringSafe() + "]. " + ex.Message - null - null
See Also