Public Member Functions | Private Attributes | List of all members
roslint.cpplint.FileInfo Class Reference
Inheritance diagram for roslint.cpplint.FileInfo:
Inheritance graph
[legend]

Public Member Functions

def __init__ (self, filename)
 
def BaseName (self)
 
def Extension (self)
 
def FullName (self)
 
def IsSource (self)
 
def NoExtension (self)
 
def RepositoryName (self)
 
def Split (self)
 

Private Attributes

 _filename
 

Detailed Description

Provides utility functions for filenames.

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

Definition at line 1100 of file cpplint.py.

Constructor & Destructor Documentation

◆ __init__()

def roslint.cpplint.FileInfo.__init__ (   self,
  filename 
)

Definition at line 1107 of file cpplint.py.

Member Function Documentation

◆ BaseName()

def roslint.cpplint.FileInfo.BaseName (   self)
File base name - text after the final slash, before the final period.

Definition at line 1174 of file cpplint.py.

◆ Extension()

def roslint.cpplint.FileInfo.Extension (   self)
File extension - text following the final period.

Definition at line 1178 of file cpplint.py.

◆ FullName()

def roslint.cpplint.FileInfo.FullName (   self)
Make Windows paths like Unix.

Definition at line 1110 of file cpplint.py.

◆ IsSource()

def roslint.cpplint.FileInfo.IsSource (   self)
File has a source file extension.

Definition at line 1186 of file cpplint.py.

◆ NoExtension()

def roslint.cpplint.FileInfo.NoExtension (   self)
File has no source file extension.

Definition at line 1182 of file cpplint.py.

◆ RepositoryName()

def roslint.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.

Definition at line 1114 of file cpplint.py.

◆ Split()

def roslint.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).

Definition at line 1160 of file cpplint.py.

Member Data Documentation

◆ _filename

roslint.cpplint.FileInfo._filename
private

Definition at line 1108 of file cpplint.py.


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


roslint
Author(s): Mike Purvis, Jack O'Quin
autogenerated on Sun Mar 5 2023 03:27:29