FileSystemInfo.FullName 속성
파일이나 디렉터리의 전체 경로를 가져옵니다.
네임스페이스: System.IO
어셈블리: mscorlib(mscorlib.dll)
구문
‘선언
Public Overridable ReadOnly Property FullName As String
‘사용 방법
Dim instance As FileSystemInfo
Dim value As String
value = instance.FullName
public virtual string FullName { get; }
public:
virtual property String^ FullName {
String^ get ();
}
/** @property */
public String get_FullName ()
public function get FullName () : String
속성 값
전체 경로를 포함하는 문자열입니다.
예외
예외 형식 | 조건 |
---|---|
호출자에게 필요한 권한이 없는 경우 |
설명
예를 들어, c:\NewFile.txt 파일의 경우 이 속성은 "c:\NewFile.txt"를 반환합니다.
다음 표에서는 일반적인 예 또는 관련된 I/O 작업의 예를 보여 줍니다.
수행 작업 |
참조 항목 |
---|---|
텍스트 파일을 만듭니다. |
|
텍스트 파일에 씁니다. |
|
텍스트 파일에서 읽습니다. |
|
디렉터리의 파일을 크기순으로 정렬합니다. |
|
디렉터리의 파일을 참조하십시오. |
|
디렉터리의 하위 디렉터리를 참조하십시오. |
|
파일이 있는지 여부를 확인합니다. |
|
디렉터리가 있는지 여부를 확인합니다. |
|
경로에서 디렉터리 이름만 검색합니다. |
|
경로에서 파일 이름 및 확장명을 검색합니다. |
|
확장명을 변경합니다. |
예제
다음 예제에서는 FullName 속성을 보여 줍니다. 이 코드 예제는 FileSystemInfo 클래스에 대해 제공되는 보다 큰 예제의 일부입니다.
Sub DisplayFileSystemInfoAttributes(ByVal fsi As IO.FileSystemInfo)
' Assume that this entry is a file.
Dim entryType As String = "File"
' Determine if this entry is really a directory.
If (fsi.Attributes And FileAttributes.Directory) <> 0 Then
entryType = "Directory"
End If
' Show this entry's type, name, and creation date.
Console.WriteLine("{0} entry {1} was created on {2:D}", _
entryType, fsi.FullName, fsi.CreationTime)
End Sub
.NET Framework 보안
- FileIOPermission 해당 경로에 액세스하는 데 필요한 권한입니다. 연관된 열거형: FileIOPermissionAccess.PathDiscovery
플랫폼
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
.NET Framework에서 모든 플래폼의 모든 버전을 지원하지는 않습니다. 지원되는 버전의 목록은 시스템 요구 사항을 참조하십시오.
버전 정보
.NET Framework
2.0, 1.1, 1.0에서 지원
.NET Compact Framework
2.0, 1.0에서 지원
참고 항목
참조
FileSystemInfo 클래스
FileSystemInfo 멤버
System.IO 네임스페이스