def run( self ):
		check_for_path( self.getPath(), "No directory specified!" )
		mApp().debugN( self, 4, 'checking directory "{0}"'.format( self.getPath() ) )
		if ( os.path.exists( str( self.getPath() ) ) ):
			return 0
		else:
			return 1
Exemplo n.º 2
0
 def run(self):
     check_for_path(self.getPath(), "No directory specified!")
     mApp().debugN(self, 2, 'deleting directory "{0}"'.format(self.getPath()))
     try:
         rmtree(str(self.getPath()))
         return 0
     except (OSError, IOError) as e:
         error = 'error deleting directory "{0}": {1}'.format(self.getPath(), str(e))
         self._setStdErr(error.encode())
         mApp().debug(self, error)
         return 1
Exemplo n.º 3
0
	def setup( self ):
		check_for_path( self.getDoxygenFile(), 'The doxygen configuration file name needs to be a nonempty string!' )
		docsDir = os.path.join( self.getInstructions().getBaseDir(), self.getDocsDir() or self.getInstructions().getDocsDir() )

		# create folders if necessary
		if self.getDocsDir():
			# make docs folder
			step = self.getInstructions().getStep( 'create-folders' )
			step.addMainAction( MkDirAction( docsDir ) )

			# cleanup
			step = self.getInstructions().getStep( 'cleanup' )
			step.addMainAction( RmDirAction( docsDir ) )

		# run doxygen
		step = self.getInstructions().getStep( 'create-docs' )
		cmd = [ self.getCommand(), str( self.getDoxygenFile() ) ]
		doxygenCall = ShellCommandAction( cmd, searchPaths = self.getCommandSearchPaths() )
		doxygenCall.setWorkingDirectory( docsDir )
		step.addMainAction( doxygenCall )
Exemplo n.º 4
0
 def setWorkingDirectory(self, workingDir):
     """Set the directory to execute the command in."""
     check_for_path(workingDir, "The working directory parameter must be a string containing a directory name.")
     self.__workingDir = workingDir
Exemplo n.º 5
0
	def setSrcDir( self, srcDir ):
		check_for_path( srcDir, 'The course folder needs to be a non-empty string!' )
		self.__srcDir = srcDir
Exemplo n.º 6
0
	def setPath( self, path ):
		check_for_path( path, "The directory to create must be a non-empty name of a directory!" )
		self.__path = path
Exemplo n.º 7
0
	def setWorkingDir( self, dir ):
		check_for_path( dir, 'The working directory must be a non-empty string!' )
		self.__workingDir = str( dir )