{"id":79,"date":"2008-08-20T21:12:25","date_gmt":"2008-08-20T21:12:25","guid":{"rendered":""},"modified":"2008-08-20T21:12:25","modified_gmt":"2008-08-20T21:12:25","slug":"icetips-core-class","status":"publish","type":"post","link":"http:\/\/www.icetips.com\/blog_wp\/2008\/08\/20\/icetips-core-class\/","title":{"rendered":"Icetips Core Class"},"content":{"rendered":"<p>I managed to finish the documentation and demo app for the <b>Core class <\/b>today.  The Core class is the base class that all the other classes inherit from.  I moved two methods up from the WindowsClass to it today.  One that gets the last API error and one that returns a formatted string for the last api error.  Those methods belonged in the core class, but were left out when I created the core class.  <\/p>\n<p>You can now <b>view the Icetips Utilities documentation online<\/b> at <a href=\"#\" target=\"_blank\">http:\/\/www.icetips.com\/manuals\/utilities\/index.html<\/a><\/p>\n<p>The <b>SetFileAttrib <\/b>method was also not complete so I finished it.  It, along with the <b>GetFileAttrib <\/b>method, let you set or get the read-only, hidden and system properties of files, which comes in handy if you need to delete read-only files or hidden files that your software creates.  With these methods you can gain full control over the file attributes.  <\/p>\n<p>The Core class also contains a new method, <b>IsFileInUse <\/b>which attempts to open a file with write access to determine if the file can be accessed.  If it fails, the method deems the file to be in use by some other program or process.  <\/p>\n<p>One other new method in the Core class is the <b>CreateGUID <\/b>method.  It creates a GUID which is useful for a lot of things.  We use GUIDs extensively in the Build Automator to link XML files together.  <\/p>\n<p><b>IsFolder <\/b>is another very useful new method to determine if a path is a valid path or if the last part of it is a filename.  For example you could pass something like this to a method expecting either a path or a filename: 'C:\\Temp\\SomeThing'  Does this mean that SomeThing is a path witout a trailing backslash or is it a file without extension, i.e. should it be 'C:\\Temp\\Something\\' or C:\\Temp\\Something.'  The IsFolder will return true if 'Something' is a folder and false if it is a file.  This is important when using methods such as <b>GetFilePart <\/b>because if the trailing backslash is missing from a path it would interpret 'SomeThing' as a file and that could cause all kinds of problems.<\/p>\n<p>Tomorrow morning I will build a new install for the classes, templates and demos and they will be out sometime tomorrow, depening on how much work I need to do on the install process.  Now of course I have the <a href=\"http:\/\/www.buildautomator.com\" target=\"_blank\">Build Automator<\/a> to help me with that process.  Building the install for the Icetips Utilities was actually the thing that caused me to get the idea for the <a href=\"http:\/\/www.buildautomator.com\" target=\"_blank\">Build Automator<\/a> in the first place.  <\/p>\n<p>Arnor Baldvinsson<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_79\" class=\"pvc_stats all  \" data-element-id=\"79\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"http:\/\/www.icetips.com\/blog_wp\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>I managed to finish the documentation and demo app for the Core class today. The Core class is the base class that all the other classes inherit from. I moved two methods up from the WindowsClass to it today. One that gets the last API error and one that returns a formatted string for the <a href=\"http:\/\/www.icetips.com\/blog_wp\/2008\/08\/20\/icetips-core-class\/\" class=\"more-link\">...continue reading <span class=\"screen-reader-text\">Icetips Core Class<\/span><\/a><\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_79\" class=\"pvc_stats all  \" data-element-id=\"79\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"http:\/\/www.icetips.com\/blog_wp\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"categories":[6],"tags":[],"class_list":["post-79","post","type-post","status-publish","format-standard","hentry","category-news"],"_links":{"self":[{"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/posts\/79","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/comments?post=79"}],"version-history":[{"count":0,"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/posts\/79\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/media?parent=79"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/categories?post=79"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/tags?post=79"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}