require_relative  'windowsFileSystem'
require_relative 'filesUtil'
require_relative  'filecreate'

@outputFile = Filecreate.new
@outputFile.filename = "files.txt"
@outputFile.create
@filesUtil = Filesutil.new
@fileSystem = Windowsfilesystem.new
@drives = @fileSystem.allDrives
@drives.each do |drive|
	#puts drive.DriveLetter
	#puts drive.DriveType
	if drive.DriveType == 2
		@files = @filesUtil.findFilesByFileName(drive.Path,'*.*')
		@filesTooLong = @files.select{|f| @filesUtil.getExpandedPathByFileName(f).length > 260}
		@filesTooLong.each do |file|
			@whatToWrite = @filesUtil.getExpandedPathByFileName(file)
			@outputFile.writeWindowsFilePath(@whatToWrite)
		end
	end
end