18 Path 관련 Shell API
18 Path 관련 Shell API
원문 : http://kkamagui.springnote.com/pages/790020
참고 : http://blog.naver.com/drvoss/20046975128
|
함 수 명 |
인 자 |
결 과 |
|
PathAddBackslash |
c:\path1 |
c:\path1\ |
|
PathBuildRoot |
0 |
A:\ |
|
PathCanonicalize |
c:\path1\..\.\path1 |
c:\path1 |
|
PathCompactPath |
c:\path1\path2\path3\file.txt |
c:\path1\...\file.txt |
|
PathFileExists |
c:\path1\file.txt |
파일의존재유무[T/F] |
|
PathFindFileName |
c:\path1\path2\file.txt |
file.txt |
|
PathIsDirectory |
c:\path1\path2 |
디렉토리유무[T/F] |
|
PathIsfileSpec |
file.txt |
순수파일이름인지[T/F] |
|
PathMakePretty |
C:\PATH1\FILE.TXT |
C:\path1\file.txt |
|
PathIsNetworkPath |
\\YHKim\path1\file.txt |
네트워크경로인지[T/F] |
|
PathIsRoot |
c:\ |
루트경로인지유무[T/F] |
|
PathIsSystemFolder |
c:\windows\System32 |
시스템폴더인지유무[T/F] |
|
PathRemoveBackslash |
c:\path1\path2\ |
c:\path1\path2 |
|
PathRemoveBlanks |
“ c:\path1\path2 “ |
“c:\path1\path2” |
|
PathRemoveExtension |
c:\path1\path2\file.txt |
c:\path1\path2\file |
|
PathRemoveFileSpec |
c:\path1\path2\file.txt |
c:\path1\path2 |
|
PathRenameExtension |
c:\path1\path2\file.txt |
c:\path1\path2\file.changed |
|
PathStripPath |
c:\path1\path2\file.txt |
file.txt |
관련된 참고할 만한 MSDN Resource
Shell Function들 중 일부 함수들
http://msdn2.microsoft.com/en-us/library/bb776426(VS.85).aspx
Shell Lightweight Utility Functions중 Path와 관련된 함수들
http://msdn2.microsoft.com/en-us/library/bb773559(VS.85).aspx
User Profiles Function중 Path를 얻어 오는데 관련된 함수들
http://msdn2.microsoft.com/en-us/library/aa375109(VS.85).aspx
ps. Path가 등록이된 파일을 찾고 싶다면, SearchPath를 이용하면 FullPath가 넘어 온다.
Qus) 클라이언트 컴퓨터에 설치된 firefox의 경로를 찾고 싶은데 어떻게 하지? Firefox가 써 놓은 레지스터리값를 뒤져볼까? firefox의 기본 설치 경로에 exe 파일을 createfile해서 판단할까?
Ans) SearchPath를 이용하셔서 FullPath를 얻으시고, 얻은 FullPath를 PathFileExists로 검증하시면 됩니다.
History
Last edited on 02/09/2008 01:53 by kkamagui
Comments (0)