C# 클래스 LogViewer.FileUtil

파일 보기 프로젝트 열기: Lundalogik/log4net-logviewer

공개 메소드들

메소드 설명
OpenReadOnly ( string fileName, long position ) : FileStream
ShortenPathname ( string pathname, int maxLength ) : string

Shortens a pathname for display purposes.

Shortens a pathname by either removing consecutive components of a path and/or by removing characters from the end of the filename and replacing then with three elipses (...)

In all cases, the root of the passed path will be preserved in it's entirety.

If a UNC path is used or the pathname and maxLength are particularly short, the resulting path may be longer than maxLength.

This method expects fully resolved pathnames to be passed to it. (Use Path.GetFullPath() to obtain this.)

메소드 상세

OpenReadOnly() 공개 정적인 메소드

public static OpenReadOnly ( string fileName, long position ) : FileStream
fileName string
position long
리턴 System.IO.FileStream

ShortenPathname() 공개 정적인 메소드

Shortens a pathname for display purposes.
Shortens a pathname by either removing consecutive components of a path and/or by removing characters from the end of the filename and replacing then with three elipses (...)

In all cases, the root of the passed path will be preserved in it's entirety.

If a UNC path is used or the pathname and maxLength are particularly short, the resulting path may be longer than maxLength.

This method expects fully resolved pathnames to be passed to it. (Use Path.GetFullPath() to obtain this.)

public static ShortenPathname ( string pathname, int maxLength ) : string
pathname string
maxLength int
리턴 string