Total Pageviews

Wednesday, April 2, 2014

Library IO របស់ Corona SDK


តើតួនាទីរបស់ IO សំរាប់ធ្វើអ្វីនៅក្នុងឡូអា? បើពិនិត្យឪ្យបានលំអិតយើងនឹងឃើញថាវាជា Standard Lua Library ប្រើក្នុង ការបង្កើត សរសេរ ហើយនឹង អាន
កម្មវិធីដំណើរការលើ Devices ជា “Sandboxed” មានន័យថាហ្វាលរបស់កម្មវិធី (រូប, ទិន្នន័យ, Preferences) ត្រូវបានផ្ទុកនៅក្នុងកន្លែងមួយដែលកម្មវិធីផ្សេងទៀតមិនអាច Access បាន។ កម្មវិធីស្ថិតនៅក្នុង App-specific directory for documents, resources or temporary files។ ដូចនេះ File Library functions អាចធ្វើការ គ្រប់គ្រង់លើវាបាន។
ហ្វាំងសិនះ
Is.close() io.flush() io.input() io.lines() io.open() io.output() io.read() io.tmpfile() io.type() io.write()

មានតែការមើលលំអិតទេទើបអាចយល់បាន
Io.close()
គេប្រើសំរាប់បិទ an open file handle, វាស្មើនឹង file:close()
បើសិនជាហ្វាល handle មិនត្រូវបានប្រាប់ច្បាស់ ពេលនោះហ្វាំងសិននឹងបិទ default output file
Syntax: io.close( [file] )

File (ជំរើស) វានឹង Handle of file (ដែលត្រឡប់មកពី io.open) ដែលត្រូវបិទ

No comments:

Post a Comment