Package licensechecker :: Module fileinfo :: Class FileInfo
[hide private]
[frames] | no frames]

Class FileInfo

source code

Class used to match file extensions and file types (mostly programming languages though).

Instance Methods [hide private]
 
__init__(self, typename='Unknown', extensions=())
Build an new instance of FileInfo.
source code
string
getTypeName(self)
Returns the typename of this FileInfo.
source code
[string,]
getExtensions(self)
Returns the extensions of this FileInfo.
source code
Method Details [hide private]

__init__(self, typename='Unknown', extensions=())
(Constructor)

source code 

Build an new instance of FileInfo.

Parameters:
  • typename - a string denoting the file type (ex.: 'C', 'Pascal', 'Java')
  • extensions - a tuple of strings describing the file extensions associated with the file type. The strings must not begin with a dot.

getTypeName(self)

source code 

Returns the typename of this FileInfo.

Returns: string
the typename of this FileInfo.

getExtensions(self)

source code 

Returns the extensions of this FileInfo.

Returns: [string,]
a list of extensions associated to this FileInfo.