#NEWLINE# def CreateGRRTempFileVFS( directory = None , filename = None , lifetime = 0 , mode = 'w+b' , suffix = '' ) : #NEWLINE# #INDENT# "Creates a GRR VFS temp file.\n\n  This function is analogous to CreateGRRTempFile but returns an open VFS handle\n  to the newly created file. Arguments are the same as for CreateGRRTempFile:\n\n  Args:\n    directory: string representing absolute directory where file should be\n               written. If None, use 'tmp' under the directory we're running\n               from.\n\n    filename: The name of the file to use. Note that setting both filename and\n       directory name is not allowed.\n\n    lifetime: time in seconds before we should delete this tempfile.\n\n    mode: The mode to open the file.\n\n    suffix: optional suffix to use for the temp file\n\n  Returns:\n    An open file handle to the new file and the corresponding pathspec.\n  " #NEWLINE# fd = CreateGRRTempFile ( directory = directory , filename = filename , lifetime = lifetime , mode = mode , suffix = suffix ) #NEWLINE# pathspec = rdf_paths . PathSpec ( path = pathspec . name , pathtype = rdf_paths . PathSpec . PathType . TMPFILE ) #NEWLINE# return ( fd , pathspec )