Module EDUtilsFile :: Class EDUtilsFile
[hide private]
[frames] | no frames]

Class EDUtilsFile

source code

object --+
         |
        EDUtilsFile

Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods [hide private]
 
readFileAndParseVariables(cls, _strFileName, _dict=None)
Returns the content of this file as a string.
source code
Static Methods [hide private]
 
readFile(_strFileName)
Reads and returns the content of a file.
source code
 
writeFile(_strFileName, _strContent)
Writes a string to a file.
source code
 
getFileExtension(_strFileName)
Returns the file extension, e.g.
source code
 
getBaseName(_strFileName) source code
 
copyFile(_strSource, _strDestination) source code
 
deleteFile(_strFileName) source code
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

readFile(_strFileName)
Static Method

source code 

Reads and returns the content of a file.

Parameters:
  • _strFileName - Path to the file
Returns:
String containing the contents of the file.

writeFile(_strFileName, _strContent)
Static Method

source code 

Writes a string to a file. If the string is not already in unicode format it will be converted to unicode.

Parameters:
  • _strFileName - Path to file, will be created if not existing
  • _strContent - String content to be written to the file

readFileAndParseVariables(cls, _strFileName, _dict=None)
Class Method

source code 

Returns the content of this file as a string. Any environment variables present in the file are substituted, as well as any occurrences of strings in the optional dictionary.

Parameters:
  • _strFileName - Path to the file
  • _dict - Optional dictoionary

getFileExtension(_strFileName)
Static Method

source code 

Returns the file extension, e.g. "img" for "testscale_1_001.img"

Parameters:
  • _strFileName - String containing the file name