[Wnd-commit] wnd/wnd_doc/doc/api/winpath winpath.dtpl,NONE,1.1
Status: Alpha
Brought to you by:
jurner
|
From: jürgen u. <cer...@us...> - 2005-05-15 09:57:49
|
Update of /cvsroot/wnd/wnd/wnd_doc/doc/api/winpath In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7390 Added Files: winpath.dtpl Log Message: new module --- NEW FILE: winpath.dtpl --- ::site:: winpath This modue contains sevaral path functions from ahlwapi.dll <br><br> Use these for fast processing path operations <br><br> ::folder:: path methods ::item:: AddBackslash <code>AddBackslash(path)</code><br> <P>Adds a backslash to pathid required. <br><br> If path alreaddy ends with a backslash, no backslash is appended </P> ::item:: GetExtension <code>GetExtension(path)</code><br> <P>Returns the extension of path or '' (empty string) if no extension was found </P> ::item:: GetFileName <code>GetFileName(path)</code><br> <P>Returns the filename part of path or None if no filename was found. </P> ::item:: AddExtension <code>AddExtension(path, ext)</code><br> <P>Adds the specified aextension to path. <br><br> If the extension could not be added an error is raised. This will happen for example if path alreaddy has an extension </P> ::item:: Append <code>Append(path1, path2)</code><br> <P>appends path2 to path1 and returns the resulting path </P> ::item:: BuiltRoot <code>BuiltRoot(n)</code><br> <P>Builts the root path according to the specified drive number or '' (empty string) if not unsuccessfull <br><br> BuiltRoot(1) should return 'B:\\' </P> ::item:: Combine <code>Combine(path1, path2)</code><br> <P>Combines two paths and returns the resulting path </P> ::item:: Compact <code>Compact(hDC, hFont, path, cx)</code><br> <P>Compacts a path to fit into the specified pixel width and returns it compacted. <br><br> If something goes wrong the path is returned unchanged <br><br> <DL> <DT>hDC <DD>handle of the device context to use <DT>hFont <DD>the font to refere to for compacting. If hFont is None the current font of the dc is used <DT>path <DD>the path to compact <DT>cx <DD>the width in pixels the path is supposed to fit in </DL> <br><br> The returned path may be padded with ellipses up to the filename part of the path. </P> ::item:: Exists <code> Exists(path)</code><br> <P>Returns true if the file or folder pointed to by path exists, False otherwise </P> ::item:: Iter <code>Iter(path)</code><br> <P>Iterates over path returning the next component in turn. <br><br> <pre> path.Iter(aaa\\bbb\\ccc) >> c:\\aaa\\bbb\\ccc >> bbb\\ccc >> ccc </pre> </P> ::item:: IterReverted <code>IterReverted(path)</code><br> <P>Iterates over path returning the next component in turn <br><br> Variation of <a HREF="Iter.html">Iter</a>. Home brewn api, the like. Instead of returning the next component in turn it returns everything up to the previous component. component. <br><br> <pre> path.IterReversed(aaa\\bbb\\ccc) >> c:\\aaa\\bbb\\ccc >> c:\\aaa\\bbb >> c:\\aaa >> c:\\ </pre> </P> ::item:: GetArgs <code>GetArgs(path)</code><br> <P>returns everything that follows path, one could interpret as arguments or None, if no args where found </P> ::item:: GetDriveNumber <code>GetDriveNumber(path)</code><br> <P>Returns the drive number found in path or None. </P> ::item:: IsDir <code>IsDir(path)</code><br> <P>Returns true if path points to a directory, False otherwise </P> ::item:: IsURL <code>IsURL(path)</code><br> <P>returns true if path seems to be a valid path for an URL, False otherwise </P> ::item:: MatchSpec <code>MatchSpec(path, spec)</code><br> <P>Returns true if path matches the specified spec, False otherwise. <br><br> DOS wildcards welcome.<br> IsSpec('myPath.txt', '*.txt') should return True. </P> ::item:: QuoteSpaces <code>QuoteSpaces(path)</code><br> <P>Quotes the path if it contains spaces and returns it </P> ::item:: RemoveArgs <code>RemoveArgs(path)</code><br> <P>Removes args from path and returns the stripped path <br><br> If soething goes wrong the path is returned unchanged </P> ::item:: RemoveFileSpec <code>RemoveFileSpec(path)</code><br> <P>Removes the trailing part of path and returns the resulting path <br><br> If soething goes wrong the path is returned unchanged </P> ::item:: RemoveExtension <code>RemoveExtension(path)</code><br> <P>removes the extension from path and returns it <br><br> If soething goes wrong the path is returned unchanged </P> ::item:: ReplaceExtension <code>ReplaceExtension(path, ext)</code><br> <P>replaces the extension of path and returns the path or None if something goes wrong. <br><br> If soething goes wrong the path is returned unchanged </P> ::item:: StripRoot <code>StripRoot(path)</code><br> <P>Returns path with root stripped or None if something goes wrong </P> ::item:: StripPath <code>StripPath(path)</code><br> <P>removes all path components from path and returns it </P> ::item:: GetRoot <code>GetRoot(path)</code><br> <P>returns the root of path or None if something goes wrong </P> ::item:: UnquoteSpaces <code>UnquoteSpaces(path)</code><br> <P>Removes quotes from path if necessary and return it </P> ::item:: IsRoot <code>IsRoot(path)</code><br> <P>returns true if path is a root path, False otherwise <br><br> This is true for c:\\ but not for c: </P> |