webkit
2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
|
Public Member Functions | |
def | __init__ (self, filename) |
def | full_name (self) |
def | repository_name (self) |
def | split (self) |
def | base_name (self) |
def | extension (self) |
def | no_extension (self) |
def | is_source (self) |
Provides utility functions for filenames. FileInfo provides easy access to the components of a file's path relative to the project root.
def webkitpy.style.checkers.cpp.FileInfo.__init__ | ( | self, | |
filename | |||
) |
def webkitpy.style.checkers.cpp.FileInfo.base_name | ( | self | ) |
File base name - text after the final slash, before the final period.
def webkitpy.style.checkers.cpp.FileInfo.extension | ( | self | ) |
File extension - text following the final period.
def webkitpy.style.checkers.cpp.FileInfo.full_name | ( | self | ) |
Make Windows paths like Unix.
def webkitpy.style.checkers.cpp.FileInfo.is_source | ( | self | ) |
File has a source file extension.
def webkitpy.style.checkers.cpp.FileInfo.no_extension | ( | self | ) |
File has no source file extension.
def webkitpy.style.checkers.cpp.FileInfo.repository_name | ( | self | ) |
Full name after removing the local path to the repository. If we have a real absolute path name here we can try to do something smart: detecting the root of the checkout and truncating /path/to/checkout from the name so that we get header guards that don't include things like "C:\Documents and Settings\..." or "/home/username/..." in them and thus people on different computers who have checked the source out to different locations won't see bogus errors.
def webkitpy.style.checkers.cpp.FileInfo.split | ( | self | ) |
Splits the file into the directory, basename, and extension. For 'chrome/browser/browser.cpp', Split() would return ('chrome/browser', 'browser', '.cpp') Returns: A tuple of (directory, basename, extension).