Package Ganga :: Package GPIDev :: Package Lib :: Package File :: Module FileBuffer' :: Class FileBuffer
[hide private]
[frames] | no frames]

Class FileBuffer

source code

FileBuffer represents a file in memory which has not been yet created. This is a handy way of creating small wrapper scripts to be generated on the fly.

Instance Methods [hide private]
 
__init__(self, name, contents, subdir='.', executable=0)
name is the name of the file to be created contents is the text with file contents or a file-object which will be read() executable indicates if a file is create()'ed with executable permissions
source code
 
create(self, outname)
create a file in a local filesystem as 'outname'
source code
 
getContents(self)
return a string with the contents of the file buffer
source code
 
getPathInSandbox(self)
return a relative location of a file in a sandbox: subdir/name
source code
 
isExecutable(self)
return true if a file is create()'ed with executable permissions
source code