Greetings,
For a while now, we have a system in our application that can clean up images that are send to and from our RhoMobile application. With this process, we ensure that we reduce the used amount of data on devices to a minimum.
With the update to RhoMobile Suite 4.0 tho, this system stoppen worden on Windows Mobile devices. When the following code executes, the application just crashes without a log note or an error message. Can anyone tell me what is happening here?
Device: Motorola MC65 with Windows Mobile 6.5.3.
Code:
# Make a shortcut for the path
file_data_path = self.join( Rho::Application.userFolder, "workorder_file_data" )
# Check if its a directory
if File.directory? file_data_path
# Go trough all entries
Dir.new( file_data_path ).each do |entry|
# Try and delete the files
begin
File.delete( File.join( file_data_path, entry ) ) unless entry == "." || entry == ".."
rescue
# Do nothing, we`ll try again next time
end # End begin
end # End each
end # End if
Cheers,
Bart
Hi Bart,
File API syntax got changed in the RMS 4.0. Please refer this http://docs.rhomobile.com/en/4.0.0/api/File.
Visnupriya R
Kutir Mobility
Points: 0
You voted ‘up’
Right, I missed that one. Thanks for the heads up, I got it fixed now
Bart
Points: 0
You voted ‘up’