Writing an XML file to Android

Source: Internet
Author: User

----Formshow

NewPath: = '/storage/sdcard0/dcim/100andro/grjkdaglgxysf ';
If not tdirectory.exists (NewPath) THEN BEGIN
Tdirectory.createdirectory (NewPath); Create a folder
End
NewPath: = NewPath + '/';

----Deposit to this machine

Var

filename:string;
Newfile:tfilestream;

Begin

FileName: = ' update_sf_ ' + formatdatetime (' Yyyy-mm-dd ', now) + Gxyglkid;
NewFile: = tfile.create (NewPath + filename);
NewFile. Free;
Clientdatasetlocal. SaveToFile (NewPath + filename,dfxml);

End

---Create a file

Var
newpath:string;
Newfile:tfilestream;
Begin
NewPath: = '/STORAGE/SDCARD0/DCIM/100ANDRO/GRJKDAGLF ';
If tfile.exists (NewPath + '/update.xml ') THEN BEGIN
ShowMessage (' File exists ');
End
ELSE begin
NewFile: = tfile.create (NewPath + '/update.xml '); Create a file (stream)
NewFile. Free; Clear Stream
Speedbutton5click (self); Close the window
TotalWork (path, True); Update the list
End


---Create a file path

Var
newpath:string;
Begin
NewPath: = '/STORAGE/SDCARD0/DCIM/100ANDRO/GRJKDAGLF ';
ShowMessage (NewPath);
If Tdirectory.exists (NewPath) THEN BEGIN
ShowMessage (' Folder exists! ');
End
ELSE begin
Tdirectory.createdirectory (NewPath); Create a folder
ShowMessage (' Folder created! ');
Speedbutton5click (self); Close the window
TotalWork (path, True); Update the list
End

This article is from the "All for the law, such as Fleeting Dream" blog, please be sure to keep this source http://kaixinbuliao.blog.51cto.com/2567365/1535172

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.