Package qm :: Package test :: Package classes :: Module file_label :: Class FileLabel
[hide private]
[frames] | no frames]

Class FileLabel
source code

label.Label --+
              |
             FileLabel

A 'FileLabel' is a 'Label' that uses the filesystem's naming scheme.

A 'FileLabel' is a 'Label' whose separator character is the operating system's file system separator character (typically '/' or '\'). These labels are not system-independent; there is no guarantee that 'FileLabel's will have the same meaning on different operating systems.

Instance Methods [hide private]
  Join(self, *labels)
Combine this label and the 'labels' into a single label.
  Split(self)
Split the label into a pair '(directory, basename)'.
  Basename(self)
Return the basename for the label.
  Dirname(self)
Return the directory name for the 'label'.

Inherited from label.Label: IsValid, SplitLeft, __init__, __str__


Class Variables [hide private]
_sep  

Method Details [hide private]

Join(self, *labels)

source code 

Combine this label and the 'labels' into a single label.

'labels' -- A sequence of strings giving the components of the new label. All but the last are taken as directory names; the last is treated as a basename.
Overrides: label.Label.Join

Split(self)

source code 

Split the label into a pair '(directory, basename)'.

returns -- A pair '(directory, basename)', each of which is a label.

It is always true that 'directory.join(basename)' will return a label equivalent to the original label.
Overrides: label.Label.Split

Basename(self)

source code 

Return the basename for the label.

returns -- A string giving the basename for the label. The value returned for 'l.basename()' is always the same as 'l.split()[1]'.
Overrides: label.Label.Basename

Dirname(self)

source code 

Return the directory name for the 'label'.

returns -- A string giving the directory name for the 'label'. The value returned for 'l.dirname()' is always the same as 'l.split()[0]'.
Overrides: label.Label.Dirname

Class Variable Details [hide private]

_sep

Value:
'/'