Skia
2DGraphicsLibrary
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SkOSPath Class Reference

Functions for modifying SkStrings which represent paths on the filesystem. More...

#include <SkOSFile.h>

Static Public Member Functions

static SkString Join (const char *rootPath, const char *relativePath)
 Assembles rootPath and relativePath into a single path, like this: rootPath/relativePath. More...
 
static SkString Basename (const char *fullPath)
 Return the name of the file, ignoring the directory structure. More...
 
static SkString Dirname (const char *fullPath)
 Given a qualified file name returns the directory. More...
 

Detailed Description

Functions for modifying SkStrings which represent paths on the filesystem.

Member Function Documentation

static SkString SkOSPath::Basename ( const char *  fullPath)
static

Return the name of the file, ignoring the directory structure.

Behaves like python's os.path.basename. If the fullPath is /dir/subdir/, an empty string is returned.

Parameters
fullPathFull path to the file.
Returns
SkString The basename of the file - anything beyond the final slash, or the full name if there is no slash.
static SkString SkOSPath::Dirname ( const char *  fullPath)
static

Given a qualified file name returns the directory.

Behaves like python's os.path.dirname. If the fullPath is /dir/subdir/ the return will be /dir/subdir/

Parameters
fullPathFull path to the file.
Returns
SkString The dir containing the file - anything preceding the final slash, or the full name if ending in a slash.
static SkString SkOSPath::Join ( const char *  rootPath,
const char *  relativePath 
)
static

Assembles rootPath and relativePath into a single path, like this: rootPath/relativePath.

It is okay to call with a NULL rootPath and/or relativePath. A path separator will still be inserted.

Uses SkPATH_SEPARATOR, to work on all platforms.


The documentation for this class was generated from the following file: