11 Replies Latest reply on Nov 12, 2014 3:29 AM by Kutir Mobility

    How to create a csv file in TC55 Internal folder

    Mohankumar SK

      Hi all,

       

      I want to create a file in TC55 but getting permission denied error at "/internal/download/" I tried to create in SDCard also same error. but its working in emulator please help me to solve this problem.

       

      I used this method

      var myFile = new Rho.RhoFile(Rho.File.join(Rho.Application.userFolder,"myfilename.txt"),<file open mode>);

      to create a file. but getting uninitialized constant Rho:RhoFile error in tc55 device. Please advise how to resolve this issue.

       

      Below is My sample code:-

       

      @filename = "/internal/RWSFilePath/StockTakeResult/StockTakeResult.csv"

      File.open(@filename, "w+") do |aFile|

      if aFile

        aFile.syswrite("HEADER,CSTK201234234,poonam.sharma,C,")
        aFile.syswrite("\n")
        aFile.syswrite("StockTakeDetail,TicketNo,AssetID,AssetCode,ZoneID,ZoneCode,LocationID,LocationCode,SubLocation1ID,SubLocation1Code,SubLocation2ID,SubLocation2Code,SubLocation3ID,SubLocation3Code,CategoryID,CategoryCode,SerialNo,Remarks,LabelStatus,VerificationStatus,TicketClose")
        aFile.syswrite("\n")  

       

      end

       

      end