// API callback
av({"version":"1.0","encoding":"UTF-8","entry":{"xmlns":"http://www.w3.org/2005/Atom","xmlns$blogger":"http://schemas.google.com/blogger/2008","xmlns$georss":"http://www.georss.org/georss","xmlns$gd":"http://schemas.google.com/g/2005","xmlns$thr":"http://purl.org/syndication/thread/1.0","id":{"$t":"tag:blogger.com,1999:blog-3716092791552935940.post-1246406027317050577"},"published":{"$t":"2014-11-09T16:16:00.003+07:00"},"updated":{"$t":"2014-11-09T16:52:26.099+07:00"},"category":[{"scheme":"http://www.blogger.com/atom/ns#","term":"Linux"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Tutorial"}],"title":{"type":"text","$t":"[TUTORIAL] Akses File dan Folder dalam Linux bahasa C"},"content":{"type":"html","$t":"Hai =))\u003Cbr \/\u003E\u003Cbr \/\u003EKali ini, saya akan menjelaskan, apa saja yg berhubungan dengan akses file dan folder.\u003Cbr \/\u003E\u003Cbr \/\u003E\u003Cb\u003E\u003Cu\u003EMengakses Folder\u003C\/u\u003E\u003C\/b\u003E\u003Cbr \/\u003E\u003Cspan style=\"font-family: 'Courier New', Courier, monospace;\"\u003E\u003Cbr \/\u003E\u003C\/span\u003E\u003Cspan style=\"font-family: 'Courier New', Courier, monospace;\"\u003E\u0026nbsp; \u0026nbsp; \u0026nbsp;DIR *dir;\u003C\/span\u003E\u003Cbr \/\u003E\u003Cspan style=\"font-family: Courier New, Courier, monospace;\"\u003E\u0026nbsp; \u0026nbsp; \u0026nbsp;dir=opendir(\"home\/user\/Documents\/\");\u003C\/span\u003E\u003Cbr \/\u003E\u003Cspan style=\"font-family: Courier New, Courier, monospace;\"\u003E\u003Cbr \/\u003E\u003C\/span\u003E\u003Cb\u003E\u003Cu\u003E\u003Cspan style=\"font-family: inherit;\"\u003EMembaca Folder\u003C\/span\u003E\u003C\/u\u003E\u003C\/b\u003E\u003Cbr \/\u003E\u003Cbr \/\u003E\u003Ca name='more'\u003E\u003C\/a\u003E\u003Cb\u003E\u003Cu\u003E\u003Cspan style=\"font-family: inherit;\"\u003E\u003Cbr \/\u003E\u003C\/span\u003E\u003C\/u\u003E\u003C\/b\u003E\u003Cspan style=\"font-family: Courier New, Courier, monospace;\"\u003E\u0026nbsp; \u0026nbsp; \u0026nbsp;dirent *ent;\u003C\/span\u003E\u003Cbr \/\u003E\u003Cspan style=\"font-family: Courier New, Courier, monospace;\"\u003E\u0026nbsp; \u0026nbsp; \u0026nbsp;ent = readdir(dir);\u003C\/span\u003E\u003Cbr \/\u003E\u003Cspan style=\"font-family: Courier New, Courier, monospace;\"\u003E\u003Cbr \/\u003E\u003C\/span\u003E\u003Cb\u003E\u003Cu\u003EMenutup Folder\u003C\/u\u003E\u003C\/b\u003E\u003Cbr \/\u003E\u003Cb\u003E\u003Cu\u003E\u003Cbr \/\u003E\u003C\/u\u003E\u003C\/b\u003E\u003Cspan style=\"font-family: Courier New, Courier, monospace;\"\u003E\u0026nbsp; \u0026nbsp; \u0026nbsp;closedir(dir);\u003C\/span\u003E\u003Cbr \/\u003E\u003Cspan style=\"font-family: Courier New, Courier, monospace;\"\u003E\u003Cbr \/\u003E\u003C\/span\u003E\u003Cspan style=\"font-family: inherit;\"\u003E\u003Cb\u003E\u003Cu\u003EMendapatkan Isi dari folder\u003C\/u\u003E\u003C\/b\u003E\u003C\/span\u003E\u003Cbr \/\u003E\u003Cspan style=\"font-family: Courier New, Courier, monospace;\"\u003E\u003Cbr \/\u003E\u003C\/span\u003E\u003Cspan style=\"font-family: Courier New, Courier, monospace;\"\u003E\u0026nbsp; \u0026nbsp; \u0026nbsp;char nama[100];\u003C\/span\u003E\u003Cbr \/\u003E\u003Cspan style=\"font-family: Courier New, Courier, monospace;\"\u003E\u0026nbsp; \u0026nbsp; \u0026nbsp;strcpy(nama,ent-\u0026gt;d_name);\u003C\/span\u003E\u003Cbr \/\u003E\u003Cspan style=\"font-family: Courier New, Courier, monospace;\"\u003E\u003Cbr \/\u003E\u003C\/span\u003E\u003Cspan style=\"font-family: inherit;\"\u003E\u003Cb\u003E\u003Cu\u003EOpen File\u003C\/u\u003E\u003C\/b\u003E\u003C\/span\u003E\u003Cbr \/\u003E\u003Cspan style=\"font-family: inherit;\"\u003E\u003Cb\u003E\u003Cu\u003E\u003Cbr \/\u003E\u003C\/u\u003E\u003C\/b\u003E\u003C\/span\u003E\u003Cspan style=\"font-family: Courier New, Courier, monospace;\"\u003E\u0026nbsp; \u0026nbsp; \u0026nbsp;FILE *fin;\u003C\/span\u003E\u003Cbr \/\u003E\u003Cspan style=\"font-family: Courier New, Courier, monospace;\"\u003E\u0026nbsp; \u0026nbsp; \u0026nbsp;fin = fopen(\"home\/user\/Documents\/data.txt\",\"r\");\u003C\/span\u003E\u003Cbr \/\u003E\u003Cspan style=\"font-family: inherit;\"\u003E\u003Cbr \/\u003E\u003C\/span\u003E\u003Cspan style=\"font-family: inherit;\"\u003E\"r\" \u0026nbsp; \u0026nbsp; \u0026nbsp;= hanya bisa read\u003C\/span\u003E\u003Cbr \/\u003E\u003Cspan style=\"font-family: inherit;\"\u003E\"w\" \u0026nbsp; \u0026nbsp;= bisa read and write\u003C\/span\u003E\u003Cbr \/\u003E\u003Cspan style=\"font-family: inherit;\"\u003E\"w+\" \u0026nbsp;= bisa read and write update\u003C\/span\u003E\u003Cbr \/\u003E\u003Cspan style=\"font-family: inherit;\"\u003E\u003Cbr \/\u003E\u003C\/span\u003E\u003Cbr \/\u003E\u003Cb\u003E\u003Cu\u003EMenutup Folder\u003C\/u\u003E\u003C\/b\u003E\u003Cbr \/\u003E\u003Cb\u003E\u003Cu\u003E\u003Cbr \/\u003E\u003C\/u\u003E\u003C\/b\u003E\u003Cspan style=\"font-family: Courier New, Courier, monospace;\"\u003E\u0026nbsp; \u0026nbsp; \u0026nbsp;fclose(fin);\u003C\/span\u003E\u003Cbr \/\u003E\u003Cbr \/\u003E\u003Cbr \/\u003E\u003Cspan style=\"font-family: inherit;\"\u003E\u003Cspan style=\"background-color: white; color: #292929; line-height: 18.2000007629395px;\"\u003ETerima kasih, semoga bermanfaat..\u003C\/span\u003E\u003Cbr style=\"background-color: white; color: #292929; line-height: 18.2000007629395px;\" \/\u003E\u003Cspan style=\"background-color: white; color: #292929; line-height: 18.2000007629395px;\"\u003ESampai ketemu pertemuan mendatang =))\u003C\/span\u003E\u003Cbr style=\"background-color: white; color: #292929; line-height: 18.2000007629395px;\" \/\u003E\u003Cspan style=\"background-color: white; color: #292929; line-height: 18.2000007629395px;\"\u003E#fantasticschematics\u0026nbsp;\u003C\/span\u003E\u003C\/span\u003E"},"link":[{"rel":"replies","type":"application/atom+xml","href":"http:\/\/www.fanyagriansyah.co.vu\/feeds\/1246406027317050577\/comments\/default","title":"Post Comments"},{"rel":"replies","type":"text/html","href":"http:\/\/www.fanyagriansyah.co.vu\/2014\/11\/tutorial-akses-file-dan-folder-dalam.html#comment-form","title":"0 Comments"},{"rel":"edit","type":"application/atom+xml","href":"http:\/\/www.blogger.com\/feeds\/3716092791552935940\/posts\/default\/1246406027317050577"},{"rel":"self","type":"application/atom+xml","href":"http:\/\/www.blogger.com\/feeds\/3716092791552935940\/posts\/default\/1246406027317050577"},{"rel":"alternate","type":"text/html","href":"http:\/\/www.fanyagriansyah.co.vu\/2014\/11\/tutorial-akses-file-dan-folder-dalam.html","title":"[TUTORIAL] Akses File dan Folder dalam Linux bahasa C"}],"author":[{"name":{"$t":"Unknown"},"email":{"$t":"noreply@blogger.com"},"gd$image":{"rel":"http://schemas.google.com/g/2005#thumbnail","width":"16","height":"16","src":"https:\/\/img1.blogblog.com\/img\/b16-rounded.gif"}}],"thr$total":{"$t":"0"}}});