Public Member Functions

cpplint::FileInfo Class Reference

List of all members.

Public Member Functions

def __init__
def FullName
def RepositoryName
def Split
def BaseName
def Extension
def NoExtension
def IsSource
def __init__
def FullName
def RepositoryName
def Split
def BaseName
def Extension
def NoExtension
def IsSource

Detailed Description

Provides utility functions for filenames.

FileInfo provides easy access to the components of a file's path
relative to the project root.

Member Function Documentation

def cpplint::FileInfo::BaseName (   self  ) 
File base name - text after the final slash, before the final period.
def cpplint::FileInfo::BaseName (   self  ) 
File base name - text after the final slash, before the final period.
def cpplint::FileInfo::Extension (   self  ) 
File extension - text following the final period.
def cpplint::FileInfo::Extension (   self  ) 
File extension - text following the final period.
def cpplint::FileInfo::FullName (   self  ) 
Make Windows paths like Unix.
def cpplint::FileInfo::FullName (   self  ) 
Make Windows paths like Unix.
def cpplint::FileInfo::IsSource (   self  ) 
File has a source file extension.
def cpplint::FileInfo::IsSource (   self  ) 
File has a source file extension.
def cpplint::FileInfo::NoExtension (   self  ) 
File has no source file extension.
def cpplint::FileInfo::NoExtension (   self  ) 
File has no source file extension.
def cpplint::FileInfo::RepositoryName (   self  ) 
FullName 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 cpplint::FileInfo::RepositoryName (   self  ) 
FullName 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 cpplint::FileInfo::Split (   self  ) 
Splits the file into the directory, basename, and extension.

For 'chrome/browser/browser.cc', Split() would
return ('chrome/browser', 'browser', '.cc')

Returns:
  A tuple of (directory, basename, extension).
def cpplint::FileInfo::Split (   self  ) 
Splits the file into the directory, basename, and extension.

For 'chrome/browser/browser.cc', Split() would
return ('chrome/browser', 'browser', '.cc')

Returns:
  A tuple of (directory, basename, extension).

The documentation for this class was generated from the following files:
 All Classes Functions