Lines Matching refs:file

8 # A simple module only requires a source file, header file, and test file.
9 # Triad modules require a source, header, and test file for each triad type (like model, conductor, and hardware).
58 # Create default file paths if none were provided
141 # single file patterns (currently just 'test') can reject the other parts of the triad
194 files.each do |file|
195 all_files_exist = false unless File.exist?(file[:path])
200 files.each_with_index do |file, _i|
201 # If this file already exists, don't overwrite it.
202 if File.exist?(file[:path])
203 puts "File #{file[:path]} already exists!"
207 FileUtils.mkdir_p(File.dirname(file[:path]), verbose: false)
208 File.open(file[:path], 'w') do |f|
209 f.write("#{file[:boilerplate]}\n" % [file[:name]]) unless file[:boilerplate].nil?
210 f.write(file[:template] % [file[:name],
211 file[:includes].map { |ff| "#include \"#{ff}\"\n" }.join,
212 file[:name].upcase])
215 `svn add \"#{file[:path]}\"`
217 puts "File #{file[:path]} created and added to source control"
219 puts "File #{file[:path]} created but FAILED adding to source control!"
222 puts "File #{file[:path]} created"
231 file = filespec[:path]
232 if File.exist?(file)
234 `svn delete \"#{file}\" --force`
235 puts "File #{file} deleted and removed from source control"
237 FileUtils.remove(file)
238 puts "File #{file} deleted"
241 puts "File #{file} does not exist so cannot be removed."
288 ' test - just a test file.',
290 ' -n"camel" sets the file naming convention.',
296 ' -y"my.yml" selects a different yaml config file for module generation',