2017년 4월 14일 금요일

file naming in AI2 and name to use when sharing file


I am trying to email a file that my app is creating.  I have called the file in the display screen taav_file.  When I append data to the file I call do a call taav_file .append to file name "measured_data".  When I then try to share the file with the command "call "Sharing1" .ShareFile. File "measured_data" or taav_file.measured_data"  i get Error 2001: The File file//measured_data could not be found on your device.  Please help me understand what name i need to use to call the file for sharing.  Also, if someone can point me to some better documentation for the File function on AI2 I would appreciate it.  The current documentation is unclear to me.

--
the sharing component expects the full path to the file, see also

--
Thanks, but I am still confused.  Can you give me an example of a full path for say a file that is created with the command call "my_file" .append to File "data_file_name".  When I go to share the file i created using the call "sharing1" .ShareFile command, what do I write for the name in the file block?  I tried using a text block with "data_file_name" written in it, but I get the error file not found on device.  However, when I do a call "my_file" .ReadFrom fileName  with a text block with "data_file_name" I can retrieve the information, so the file must be there.  So my basic problem is I am not specifying the correct path in the text block when i try to specify the file I want to share.  Sorry if I am being overly wordy.

--
the full path for a file myFile.txt stored in the root directory is file:///mnt/sdcard/myFile.txt

--
It is still not working.  I made a simple picture to show you how I create the file and then try to call it to read it.  If you could tell me what to enter for the path name I would really appreciate it.  The example below can read the data, but cannot call the file for sharing.

--
with picture attached.

--
you forgot the slash
and if you store in the root directory, remove the /Test_File subdirectory
--
Thank you very much Taifun.  I know understand and the program was able to find the file.

--

댓글 없음:

댓글 쓰기