(选编自 MSDN Library)
整理了一下Windows的Path相关API,列表如下(64个):
整理了一下Windows的Path相关API,列表如下(64个):
PathAddBackslash Function
Adds a backslash to the end of a string to create the correct syntax for a path. If the source path already has a trailing backslash, no backslash will be added.
PathAddExtension Function
Adds a file extension to a path string.
PathAppend Function
Appends one path to the end of another.
PathBuildRoot Function
Creates a root path from a given drive number.
PathCanonicalize Function
Canonicalizes a path.
PathCleanupSpec Function
Removes illegal characters from a file or directory name. Enforces the 8.3 filename format on drives that do not support long file names.
PathCombine Function
Concatenates two strings that represent properly formed paths into one path, as well as any relative path pieces.
PathCommonPrefix Function
Compares two paths to determine if they share a common prefix. A prefix is one of these types: "C:\\", ".", "..", "..\\".
PathCompactPath Function
Truncates a file path to fit within a given pixel width by replacing path components with ellipses.
PathCompactPathEx Function
Truncates a path to fit within a certain number of characters by replacing path components with ellipses.
PathCreateFromUrl Function
Takes a file URL and converts it to a Microsoft MS-DOS path.
PathFileExists Function
Determines whether a path to a file system object such as a file or directory is valid.
PathFindExtension Function
Searches a path for an extension.
PathFindFileName Function
Searches a path for a file name.
PathFindNextComponent Function
Parses a path for the next path component.
PathFindOnPath Function
Searches for a file.
PathFindSuffixArray Function
Determines if a given file name has one of a list of suffixes.
PathGetArgs Function
Finds the command line arguments within a given path.
PathGetCharType Function
Determines the type of character with respect to a path.
PathGetDriveNumber Function
Searches a path for a drive letter within the range of 'A' to 'Z' and returns the corresponding drive number.
PathGetShortPath Function
Retrieves the short path form of a specified input path.
PathIsContentType Function
Determines if a file's registered content type matches the specified content type. This function obtains the content type for the specified file type and compares that string with the pszContentType. The comparison is not case sensitive.
PathIsDirectory Function
Verifies that a path is a valid directory.
PathIsDirectoryEmpty Function
Determines whether or not a specified path is an empty directory.
PathIsExe Function
Determines whether a file is an executable by examining the file extension.
PathIsFileSpec Function
Searches a path for any path delimiting characters (for example, ':' or '\' ). If there are no path delimiting characters present, the path is considered to be a File Spec path.
PathIsHTMLFile Function
Determines if a file is an HTML file. The determination is made based on the content type that is registered for the file's extension.
PathIsLFNFileSpec Function
Determines whether or not a file name is in long format.
PathIsNetworkPath Function
Determines whether a path string represents a network resource.
PathIsPrefix Function
Searches a path to determine if it contains a valid prefix of the type passed by pszPrefix. A prefix is one of these types: "C:\\", ".", "..", "..\\".
PathIsRelative Function
Searches a path and determines if it is relative.
PathIsRoot Function
Parses a path to determine if it is a directory root.
PathIsSameRoot Function
Compares two paths to determine if they have a common root component.
PathIsSlow Function
Determines whether a file path is a high-latency network connection.
PathIsSystemFolder Function
Determines if an existing folder contains the attributes that make it a system folder. Alternately indicates if certain attributes qualify a folder to be a system folder.
PathIsUNC Function
Determines if the string is a valid Universal Naming Convention (UNC) for a server and share path.
PathIsUNCServer Function
Determines if a string is a valid Universal Naming Convention (UNC) for a server path only.
PathIsUNCServerShare Function
Determines if a string is a valid Universal Naming Convention (UNC) share path, \\ server\ share.
PathIsURL Function
Tests a given string to determine if it conforms to a valid URL format.
PathMakePretty Function
Converts a path to all lowercase characters to give the path a consistent appearance.
PathMakeSystemFolder Function
Gives an existing folder the proper attributes to become a system folder.
PathMakeUniqueName Function
Creates a unique path name from a template.
PathMatchSpec Function
Searches a string using a Microsoft MS-DOS wild card match type.
PathParseIconLocation Function
Parses a file location string containing a file location and icon index, and returns separate values.
PathProcessCommand Function
Processes a string that contains a command line and generates a suitably quoted string, with arguments attached if required.
PathQuoteSpaces Function
Searches a path for spaces. If spaces are found, the entire path is enclosed in quotation marks.
PathRelativePathTo Function
Creates a relative path from one file or folder to another.
PathRemoveArgs Function
Removes any arguments from a given path.
PathRemoveBackslash Function
Removes the trailing backslash from a given path.
PathRemoveBlanks Function
Removes all leading and trailing spaces from a string.
PathRemoveExtension Function
Removes the file extension from a path, if there is one.
PathRemoveFileSpec Function
Removes the trailing file name and backslash from a path, if it has them.
PathRenameExtension Function
Replaces the extension of a file name with a new extension. If the file name does not contain an extension, the extension will be attached to the end of the string.
PathResolve Function
Converts a relative or unqualified path name to a fully-qualified path name.
PathSearchAndQualify Function
Determines if a given path is correctly formatted and fully qualified.
PathSetDlgItemPath Function
Sets the text of a child control in a window or dialog box, using PathCompactPath to make sure the path fits in the control.
PathSkipRoot Function
Parses a path, ignoring the drive letter or Universal Naming Convention (UNC) server/share path parts.
PathStripPath Function
Removes the path portion of a fully qualified path and file.
PathStripToRoot Function
Removes all parts of the path except for the root information.
PathUndecorate Function
Removes the decoration from a path string.
PathUnExpandEnvStrings Function
Takes a fully qualified path, and replaces several folder names with their associated environment string.
PathUnmakeSystemFolder Function
Removes the attributes from a folder that make it a system folder. This folder must actually exist in the file system.
PathUnquoteSpaces Function
Removes quotes from the beginning and end of a path.
PathYetAnotherMakeUniqueName Function
Creates a unique filename based on an existing filename.
浙公网安备 33010602011771号