{"id":933,"date":"2018-09-17T18:35:38","date_gmt":"2018-09-17T09:35:38","guid":{"rendered":"https:\/\/chat-messenger.com\/?p=933"},"modified":"2018-12-23T01:56:42","modified_gmt":"2018-12-22T16:56:42","slug":"file-listfiles","status":"publish","type":"post","link":"https:\/\/chat-messenger.com\/th\/\u0e1a\u0e25\u0e47\u0e2d\u0e01\/java\/\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23\u0e44\u0e1f\u0e25\u0e4cfiles","title":{"rendered":"\u0e41\u0e2a\u0e14\u0e07\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23\u0e44\u0e1f\u0e25\u0e4c\u0e43\u0e19\u0e44\u0e14\u0e40\u0e23\u0e47\u0e01\u0e17\u0e2d\u0e23\u0e35 Java"},"content":{"rendered":"<h2 class=\"common_title\"><a name=\"0\"><strong>\u0e0a\u0e27\u0e32<\/strong><strong>\u0e44\u0e14\u0e40\u0e23\u0e01\u0e17\u0e2d\u0e23\u0e35<\/strong>\u0e02\u0e49\u0e32\u0e07\u0e43\u0e19<strong>\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23\u0e44\u0e1f\u0e25\u0e4c<\/strong>\u0e41\u0e2a\u0e14\u0e07. File.listFiles()<\/a><\/h2>\n<p>\n<strong>\u0e0a\u0e27\u0e32<\/strong>\u0e41\u0e25\u0e30\u0e23\u0e30\u0e1a\u0e38\u0e44\u0e27\u0e49<strong>\u0e44\u0e14\u0e40\u0e23\u0e01\u0e17\u0e2d\u0e23\u0e35<\/strong>\u0e02\u0e49\u0e32\u0e07\u0e43\u0e19<strong>\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23\u0e44\u0e1f\u0e25\u0e4c<\/strong>\u0e41\u0e19\u0e30\u0e19\u0e33\u0e42\u0e1b\u0e23\u0e41\u0e01\u0e23\u0e21\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e17\u0e35\u0e48\u0e41\u0e2a\u0e14\u0e07 .<br \/>\n<strong>\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23\u0e44\u0e1f\u0e25\u0e4c<\/strong>\u0e17\u0e35\u0e48\u0e08\u0e30\u0e41\u0e2a\u0e14\u0e07 <strong>java.io.\u0e44\u0e1f\u0e25\u0e4c<\/strong> \u0e43\u0e0a\u0e49\u0e27\u0e34\u0e18\u0e35\u0e01\u0e32\u0e23\u0e15\u0e48\u0e2d\u0e44\u0e1b\u0e19\u0e35\u0e49\u0e02\u0e2d\u0e07\u0e0a\u0e31\u0e49\u0e19\u0e40\u0e23\u0e35\u0e22\u0e19:\n<\/p>\n<div class=\"point\">\n<ul>\n<li><strong>\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23()<\/strong>...\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23\u0e44\u0e1f\u0e25\u0e4c\u0e41\u0e25\u0e30\u0e44\u0e14\u0e40\u0e23\u0e47\u0e01\u0e17\u0e2d\u0e23\u0e35\u0e17\u0e35\u0e48\u0e2d\u0e22\u0e39\u0e48\u0e43\u0e19\u0e44\u0e14\u0e40\u0e23\u0e47\u0e01\u0e17\u0e2d\u0e23\u0e35\u0e17\u0e35\u0e48\u0e23\u0e30\u0e1a\u0e38 <u>\u0e2d\u0e32\u0e23\u0e4c\u0e40\u0e23\u0e22\u0e4c\u0e02\u0e2d\u0e07\u0e1b\u0e23\u0e30\u0e40\u0e20\u0e17\u0e2a\u0e15\u0e23\u0e34\u0e07<\/u>\u0e01\u0e25\u0e31\u0e1a\u0e14\u0e49\u0e27\u0e22<\/li>\n<li><strong>\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23\u0e44\u0e1f\u0e25\u0e4c()<\/strong>...\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23\u0e44\u0e1f\u0e25\u0e4c\u0e41\u0e25\u0e30\u0e44\u0e14\u0e40\u0e23\u0e47\u0e01\u0e17\u0e2d\u0e23\u0e35\u0e17\u0e35\u0e48\u0e2d\u0e22\u0e39\u0e48\u0e43\u0e19\u0e44\u0e14\u0e40\u0e23\u0e47\u0e01\u0e17\u0e2d\u0e23\u0e35\u0e17\u0e35\u0e48\u0e23\u0e30\u0e1a\u0e38 <u>\u0e2d\u0e32\u0e23\u0e4c\u0e40\u0e23\u0e22\u0e4c\u0e1b\u0e23\u0e30\u0e40\u0e20\u0e17\u0e44\u0e1f\u0e25\u0e4c<\/u>\u0e01\u0e25\u0e31\u0e1a\u0e14\u0e49\u0e27\u0e22<\/li>\n<\/ul>\n<\/div>\n<p><script type=\"text\/javascript\" src=\"https:\/\/chat-messenger.com\/js\/common.js?dd12sssas2223\" charset=\"UTF-8\"><\/script><br \/>\n<script type=\"text\/javascript\"> writePR(); <\/script><\/p>\n<h2 class=\"common_title\"><a name=\"1\">\u0e42\u0e1b\u0e23\u0e41\u0e01\u0e23\u0e21\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07<\/a><\/h2>\n<p>\u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a\u0e42\u0e1b\u0e23\u0e41\u0e01\u0e23\u0e21\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07 \u0e09\u0e31\u0e19\u0e44\u0e14\u0e49\u0e2a\u0e23\u0e49\u0e32\u0e07\u0e44\u0e14\u0e40\u0e23\u0e47\u0e01\u0e17\u0e2d\u0e23\u0e35\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23\u0e44\u0e1f\u0e25\u0e4c\u0e41\u0e25\u0e30\u0e40\u0e15\u0e23\u0e35\u0e22\u0e21\u0e44\u0e1f\u0e25\u0e4c\u0e15\u0e48\u0e2d\u0e44\u0e1b\u0e19\u0e35\u0e49<\/p>\n<pre class=\"console\">C:\\filelist \u2502 aaa.java \u2502 bbb.java \u2514\u2500dir ccc.java ddd.java eee.jpg\r\n<\/pre>\n\n<pre class=\"sample_src\">\u0e42\u0e21\u0e06\u0e30\u0e04\u0e07\u0e17\u0e35\u0e48\u0e2a\u0e32\u0e18\u0e32\u0e23\u0e13\u0e30 main (String [] args) { String path = &quot;C: \\\\ filelist&quot;; File dir = new File (path); File [] files = dir.listFiles (); for (int i = 0; i &lt; files.length; i++) { \u0e44\u0e1f\u0e25\u0e4c file = files[i]; System.out.println((i + 1) + &quot;: &quot; + file); } }\r\n<\/pre>\n<h2 class=\"common_title\"><a name=\"2\">\u0e1c\u0e25\u0e01\u0e32\u0e23\u0e14\u0e33\u0e40\u0e19\u0e34\u0e19\u0e01\u0e32\u0e23<\/a><\/h2>\n<p>\u25c6\u0e1c\u0e25\u0e25\u0e31\u0e1e\u0e18\u0e4c\u0e40\u0e2d\u0e32\u0e17\u0e4c\u0e1e\u0e38\u0e15<\/p>\n<pre class=\"console\">1: C:\\filelist\\aaa.java 2: C:\\filelist\\bbb.java 3: C:\\filelist\\dir\r\n<\/pre>\n<p>\u0e15\u0e2d\u0e19\u0e19\u0e35\u0e49\u0e04\u0e38\u0e13\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e41\u0e2a\u0e14\u0e07\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23\u0e44\u0e1f\u0e25\u0e4c\u0e41\u0e25\u0e30\u0e44\u0e14\u0e40\u0e23\u0e47\u0e01\u0e17\u0e2d\u0e23\u0e35\u0e17\u0e35\u0e48\u0e21\u0e35\u0e2d\u0e22\u0e39\u0e48\u0e43\u0e19 &quot;C:\\filelist&quot;<br \/>\n\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e44\u0e23\u0e01\u0e47\u0e15\u0e32\u0e21 \u0e23\u0e32\u0e22\u0e01\u0e32\u0e23\u0e44\u0e1f\u0e25\u0e4c\u0e17\u0e35\u0e48\u0e2d\u0e22\u0e39\u0e48\u0e43\u0e19 &quot;C:\\filelist\\dir&quot; \u0e08\u0e30\u0e44\u0e21\u0e48\u0e41\u0e2a\u0e14\u0e07\u0e02\u0e36\u0e49\u0e19\u0e21\u0e32<\/p>\n<p><strong>java.io.\u0e44\u0e1f\u0e25\u0e4c<\/strong> \u0e23\u0e30\u0e14\u0e31\u0e1a <strong>\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23()<\/strong>,<strong>\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23\u0e44\u0e1f\u0e25\u0e4c()<\/strong> \u0e14\u0e39\u0e40\u0e2b\u0e21\u0e37\u0e2d\u0e19\u0e27\u0e48\u0e32\u0e44\u0e21\u0e48\u0e21\u0e35\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23\u0e44\u0e14\u0e40\u0e23\u0e01\u0e17\u0e2d\u0e23\u0e35\u0e22\u0e48\u0e2d\u0e22\u0e43\u0e14\u0e1b\u0e23\u0e32\u0e01\u0e0f\u0e02\u0e36\u0e49\u0e19<br \/>\n\u0e15\u0e48\u0e2d\u0e44\u0e1b \u0e1c\u0e21\u0e08\u0e30\u0e41\u0e19\u0e30\u0e19\u0e33\u0e42\u0e1b\u0e23\u0e41\u0e01\u0e23\u0e21\u0e17\u0e35\u0e48\u0e43\u0e0a\u0e49\u0e01\u0e32\u0e23\u0e1b\u0e23\u0e30\u0e21\u0e27\u0e25\u0e1c\u0e25\u0e41\u0e1a\u0e1a\u0e40\u0e23\u0e35\u0e22\u0e01\u0e0b\u0e49\u0e33\u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e41\u0e2a\u0e14\u0e07\u0e41\u0e25\u0e30\u0e04\u0e49\u0e19\u0e2b\u0e32\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23\u0e44\u0e1f\u0e25\u0e4c\u0e41\u0e25\u0e30\u0e44\u0e14\u0e40\u0e23\u0e47\u0e01\u0e17\u0e2d\u0e23\u0e35\u0e23\u0e27\u0e21\u0e16\u0e36\u0e07\u0e44\u0e14\u0e40\u0e23\u0e47\u0e01\u0e17\u0e2d\u0e23\u0e35\u0e22\u0e48\u0e2d\u0e22\u0e44\u0e14\u0e49\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e07\u0e48\u0e32\u0e22\u0e14\u0e32\u0e22<br \/>\n<a href=\"https:\/\/chat-messenger.com\/th\/\u0e1a\u0e25\u0e47\u0e2d\u0e01\/java\/\u0e04\u0e49\u0e19\u0e2b\u0e32\u0e44\u0e1f\u0e25\u0e4c\/\"><strong>\u0e04\u0e49\u0e19\u0e2b\u0e32\u0e44\u0e1f\u0e25\u0e4c Java \u0e41\u0e1a\u0e1a\u0e27\u0e19\u0e0b\u0e49\u0e33<\/strong><\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>\u0e41\u0e2a\u0e14\u0e07\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23\u0e44\u0e1f\u0e25\u0e4c\u0e43\u0e19\u0e44\u0e14\u0e40\u0e23\u0e47\u0e01\u0e17\u0e2d\u0e23\u0e35 Java File.listFiles() \u0e43\u0e19 Java \u0e44\u0e14\u0e40\u0e23\u0e47\u0e01\u0e17\u0e2d\u0e23\u0e35\u0e17\u0e35\u0e48\u0e23\u0e30\u0e1a\u0e38 [\u2026]<\/p>","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":""},"categories":[19],"tags":[],"_links":{"self":[{"href":"https:\/\/chat-messenger.com\/th\/wp-json\/wp\/v2\/posts\/933"}],"collection":[{"href":"https:\/\/chat-messenger.com\/th\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chat-messenger.com\/th\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chat-messenger.com\/th\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/chat-messenger.com\/th\/wp-json\/wp\/v2\/comments?post=933"}],"version-history":[{"count":7,"href":"https:\/\/chat-messenger.com\/th\/wp-json\/wp\/v2\/posts\/933\/revisions"}],"predecessor-version":[{"id":1888,"href":"https:\/\/chat-messenger.com\/th\/wp-json\/wp\/v2\/posts\/933\/revisions\/1888"}],"wp:attachment":[{"href":"https:\/\/chat-messenger.com\/th\/wp-json\/wp\/v2\/media?parent=933"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chat-messenger.com\/th\/wp-json\/wp\/v2\/categories?post=933"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chat-messenger.com\/th\/wp-json\/wp\/v2\/tags?post=933"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}