|
| static const ON_wString | CleanPath (bool bTrimLeft, bool bTrimRight, bool bAllowWindowsUNCHostNameOrDiskLetter, bool bDeleteWindowsUNCHostNameOrDiskLetter, const wchar_t directory_separator, const wchar_t *dirty_path) |
| |
| static const ON_wString | CleanPath (const wchar_t *dirty_path) |
| |
| static const ON_wString | CombinePaths (const wchar_t *left_side, bool bLeftSideContainsFileName, const wchar_t *right_side, bool bRightSideContainsFileName, bool bAppendTrailingDirectorySeparator) |
| |
| static const ON_wString | CurrentDirectory (bool bWithTrailingDirectorySeparator) |
| |
| static const ON_wString | DirectoryFromPath (const wchar_t *path) |
| |
| static const ON_wString | FileNameExtensionFromPath (const wchar_t *path) |
| |
| static const ON_wString | FileNameFromPath (const wchar_t *path, bool bIncludeExtension) |
| |
| static bool | FilePathHas3dmExtension (const wchar_t *file_path, bool bAllow3dmbakExtension) |
| |
| static bool | FilePathHas3dmExtension (const char *file_path, bool bAllow3dmbakExtension) |
| |
| static const ON_wString | FullPathFromRelativePath (const wchar_t *base_path, bool bBasePathIncludesFileName, const wchar_t *relative_path) |
| |
| static bool | IsDirectory (const char *path) |
| |
| static bool | IsDirectory (const wchar_t *path) |
| |
| static bool | IsDirectorySeparator (char c, bool bAllowAlternate) |
| |
| static bool | IsDirectorySeparator (wchar_t c, bool bAllowAlternate) |
| |
| static bool | IsFile (const char *path) |
| |
| static bool | IsFile (const wchar_t *path) |
| |
| static bool | IsRelativePath (const wchar_t *path, const wchar_t directory_separator) |
| |
| static bool | IsRelativePath (const wchar_t *path) |
| |
| static bool | IsValidFileName (const char *file_name, bool bAllPlatforms) |
| |
| static bool | IsValidFileName (const wchar_t *file_name, bool bAllPlatforms) |
| |
| static bool | PathExists (const char *path) |
| |
| static bool | PathExists (const wchar_t *path) |
| |
| static const ON_wString | PlatformPath (ON_FileSystemPath::PathId path_id) |
| |
| static bool | PlatformPathIgnoreCase () |
| |
| static const ON_wString | RelativePath (const wchar_t *full_path, bool bFullPathIncludesFileName, const wchar_t *base_path, bool bBasePathIncludesFileName) |
| |
| static const ON_wString | RemoveFileName (const wchar_t *path, ON_wString *file_name) |
| |
| static const ON_wString | RemoveVolumeName (const wchar_t *path, ON_wString *volume_name) |
| |
| static void | SplitPath (const char *path, ON_String *volume, ON_String *dir, ON_String *file_name_stem, ON_String *file_name_ext) |
| |
| static void | SplitPath (const char *path, ON_wString *volume, ON_wString *dir, ON_wString *file_name_stem, ON_wString *file_name_ext) |
| |
| static void | SplitPath (const wchar_t *path, ON_wString *volume, ON_wString *dir, ON_wString *file_name_stem, ON_wString *file_name_ext) |
| |
| static void | SplitPath (const wchar_t *path, ON_wString *volume, ON_wString *dir, ON_wString *file_name_stem_and_extension) |
| |
| static const ON_wString | VolumeAndDirectoryFromPath (const wchar_t *path) |
| |
| static const ON_wString | VolumeFromPath (const wchar_t *path) |
| |
| static bool ON_FileSystemPath::IsValidFileName |
( |
const char * |
file_name, |
|
|
bool |
bAllPlatforms |
|
) |
| |
|
static |
Description: Determine if the file_name string is a permitted file name. Valid file names must be non empty, cannot have two periods in a row, and cannot contain directory separators, tildes, and other platform specific values. Parameters: file_name - [in] string to test. bAllPlatforms - [in] If true, test name for all supported platforms. Returns: True if the string can be a file name.
| static bool ON_FileSystemPath::IsValidFileName |
( |
const wchar_t * |
file_name, |
|
|
bool |
bAllPlatforms |
|
) |
| |
|
static |
Description: Determine if the file_name string is a permitted file name. Valid file names must be non empty, cannot have two periods in a row, and cannot contain directory separators, tildes, and other platform specific values. Parameters: file_name - [in] string to test. bAllPlatforms - [in] If true, test name for all supported platforms. Returns: True if the string can be a file name.
| static const ON_wString ON_FileSystemPath::RelativePath |
( |
const wchar_t * |
full_path, |
|
|
bool |
bFullPathIncludesFileName, |
|
|
const wchar_t * |
base_path, |
|
|
bool |
bBasePathIncludesFileName |
|
) |
| |
|
static |
Description: Get a the relative path from base_path to full_path. Parameters: full_path - [in] base_path - [in]
Example full_path = L"c:/a/b/c/d/somefile.txt"; base_path = L"C:/A/B/X/Y/Z/model.3dm"; ON_wString::GetRelativePath(full_path,base_path) returns L"../../../c/d/somefile.txt"
Example full_path = L"c:/a/b/somefile.txt"; base_path = L"C:/A/B/model.3dm"; ON_wString::GetRelativePath(full_path,base_path) returns L"./somefile.txt"
Remarks: Path separators on the input can be mixed. Path separators on the returned relative path are ON_wString::FileSystemPathSeparator
Description: Find the locations in a path the specify the drive, directory, file name and file extension. Parameters: path - [in] path to split volume - [out] (pass null if you don't need the volume) If volume is not null and the path parameter begins with a Windows volume specification, *volume will either be the Windows volume letter followed by the trailing colon or a Windows UNC \<hostname>. Otherwise volume will be the empty string. dir - [out] (pass null if you don't need the directory) If dir is not null and the path parameter contains a directory specification, then the returned value of *dir will be the directory specification including the trailing slash. file_name_stem - [out] (pass null if you don't need the file name stem) If file_name_stem is not null and the path parameter contains a file name specification, then the returned value of *file_name_stem will be the file name stem. file_name_ext - [out] (pass null if you don't need the extension) If file_name_ext is not null and the path parameter contains a file name extension specification, then the returned value of file_name_ext will be the file name extension including the initial '.' character. Remarks: This function will treat a front slash ( / ) and a back slash ( \ ) as directory separators. Because this function parses file names store in .3dm files and the .3dm file may have been written on a Windows computer and then read on a another computer, it looks for a volume specification even when the operating system is not Windows. This function will not return an directory that does not end with a trailing slash. This function will not return an empty filename and a non-empty extension. This function parses the path string according to these rules. It does not check the actual file system to see if the answer is correct. See Also: on_splitpath