Version 2, last updated by nrymanov@gmail.com at March 26, 2010 06:14 UTC
Использование IOUtils для обработки путей
| Вызов | Результат |
|---|---|
| TPath.GetGUIDFileName(); | A60B9BC6B8EC41A481A6D039436C2C93 |
| TPath.GetGUIDFileName(True); | 213850C8-8E8B-47A2-9D8A-46160F67C78C |
| TPath.ChangeExtension(‘file’, ‘fb2’); | file.fb2 |
| TPath.ChangeExtension(‘file’, ‘.fb2’); | file.fb2 |
| TPath.ChangeExtension(‘file’, ‘..fb2’); | file..fb2 |
| TPath.ChangeExtension(‘file.ext1’, ‘.ext2’); | file.ext2 |
| TPath.Combine(‘c:\Test’, ‘SubDir’); | c:\Test\SubDir |
| TPath.Combine(‘c:\Test\’, ‘SubDir’); | c:\Test\SubDir |
| TPath.Combine(‘c:\Test\’, ‘\SubDir’); | \SubDir |
| TPath.Combine(‘c:\Test\’, ‘.\SubDir’); | c:\Test\.\SubDir |
| TPath.Combine(‘c:\Test\’, ‘SubDir\’); | c:\Test\SubDir\ |
| TPath.Combine(‘c:\Test\.’, ‘SubDir\’); | c:\Test\.\SubDir\ |
| TPath.Combine(‘c:\Test\.’, ‘\\SubDir\’); | \\SubDir\ |
| TPath.GetDirectoryName(‘C:\Dir\Subdir’); | C:\Dir |
| TPath.GetDirectoryName(‘C:\Dir\Subdir\’); | C:\Dir\Subdir |
| TPath.GetDirectoryName(‘C:\Dir’); | C:\ |
| TPath.GetDirectoryName(‘C:\’); | |
| TPath.GetDirectoryName(‘C:’); | |
| TPath.GetExtension(‘c:\Dir\file.ext’); | ext |
| TPath.GetExtension(‘c:\Dir\file.’); | |
| TPath.GetExtension(‘c:\Dir\file’); | |
| TPath.GetExtension(‘file.ext’); | ext |
| TPath.GetExtension(‘c:\Dir\file.ext1.ext2’); | ext2 |
| TPath.GetFileName(‘c:\Dir\file.ext’); | file.ext |
| TPath.GetFileName(‘c:\Dir\file.’); | file. |
| TPath.GetFileName(‘c:\Dir\file’); | file |
| TPath.GetFileName(‘file.ext’); | file.ext |
| TPath.GetFileName(‘c:\Dir\file\’); | |
| TPath.GetFileNameWithoutExtension(‘c:\Dir\file.ext’); | file |
| TPath.GetFileNameWithoutExtension(‘c:\Dir\file.’); | file |
| TPath.GetFileNameWithoutExtension(‘c:\Dir\file’); | file |
| TPath.GetFileNameWithoutExtension(‘file.ext’); | file |
| TPath.GetFileNameWithoutExtension(‘c:\Dir\file.ext1.ext2’); | file.ext1 |
| TPath.GetFileNameWithoutExtension(‘c:\Dir\file\’); | |
| TPath.GetFullPath(‘filename.ext’); | C:\Documents and Settings\User\My Documents\RAD Studio\Projects\IOUtilsTest\filename.ext |
| TPath.GetFullPath(‘c:\Dir\file.ext’); | c:\Dir\file.ext |
| TPath.GetPathRoot(‘c:\dir\subdir’); | c:\ |
| TPath.GetPathRoot(‘c:\dir\’); | c:\ |
| TPath.GetPathRoot(‘c:\dir’); | c:\ |
| TPath.GetPathRoot(‘c:\’); | c:\ |
| TPath.GetPathRoot(‘c:’); | c: |
| TPath.GetPathRoot(‘\\server\share\dir\subdir’); | \\server\share |
| TPath.GetPathRoot(‘\\server\share\’); | \\server\share |
| TPath.GetPathRoot(‘\\server\share’); | \\server\share |
| TPath.GetPathRoot(‘\\server\’); | \\server\ |
| TPath.GetPathRoot(‘\\server’); | \\server |
| TPath.GetPathRoot(‘\dir\subdir’); | \ |
| TPath.GetPathRoot(‘dir\subdir’); | |
| TPath.GetPathRoot(‘.’); | |
| TPath.GetRandomFileName; | 4F13oM0p.zVQ |
| TPath.GetTempFileName; | C:\Documents and Settings\User\Local Settings\Temp\tmp54B6.tmp |
| TPath.GetTempPath; | C:\Documents and Settings\User\Local Settings\Temp\ |