{"id":465,"date":"2009-02-20T10:47:38","date_gmt":"2009-02-20T10:47:38","guid":{"rendered":"\/blogs\/news\/archive\/2009\/02\/20\/why-doesn-t-the-file-system-have-a-function-that-tells-you-the-number-of-files-in-a-directory.aspx"},"modified":"2009-02-20T10:47:38","modified_gmt":"2009-02-20T10:47:38","slug":"why-doesn-t-the-file-system-have-a-function-that-tells-you-the-number-of-files-in-a-directory","status":"publish","type":"post","link":"https:\/\/plexuk.co.uk\/?p=465","title":{"rendered":"Why doesn&#039;t the file system have a function that tells you the number of files in a directory?"},"content":{"rendered":"<p>There are any number of bits of information you might want to query from the file system, such as the number of files in a directory or <a href=\"http:\/\/blogs.msdn.com\/oldnewthing\/archive\/2007\/10\/29\/5750353.aspx#5781390\">the total size of the files in a directory<\/a>. Why doesn&#8217;t the file system keep track of these things? <\/p>\n<p>Well, of course, one answer is that it certainly couldn&#8217;t keep track of every possible fragment of information anybody could possibly want, because that would be an infinite amount of information. But another reason is simply a restatement of the principle we learned last time: <a href=\"http:\/\/blogs.msdn.com\/oldnewthing\/archive\/2009\/02\/16\/9425124.aspx\">Because the file system doesn&#8217;t keep track of information it doesn&#8217;t need<\/a>. <\/p>\n<p>Full Article &#8211; <a title=\"http:\/\/blogs.msdn.com\/oldnewthing\/archive\/2009\/02\/17\/9426787.aspx\" href=\"http:\/\/blogs.msdn.com\/oldnewthing\/archive\/2009\/02\/17\/9426787.aspx\">http:\/\/blogs.msdn.com\/oldnewthing\/archive\/2009\/02\/17\/9426787.aspx<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are any number of bits of information you might want to query from the file system, such as the number of files in a directory or the total size of the files in a directory. Why doesn&#8217;t the file system keep track of these things? Well, of course, one answer is that it certainly [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[338],"class_list":["post-465","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-uncategorized"],"_links":{"self":[{"href":"https:\/\/plexuk.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/465","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/plexuk.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/plexuk.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/plexuk.co.uk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/plexuk.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=465"}],"version-history":[{"count":0,"href":"https:\/\/plexuk.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/465\/revisions"}],"wp:attachment":[{"href":"https:\/\/plexuk.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=465"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/plexuk.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=465"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/plexuk.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=465"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}