Code Examples
  Home arrow Code Examples arrow Page 2 - Understanding the CompressedFolder Class
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
CODE EXAMPLES

Understanding the CompressedFolder Class
By: Nilpo
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2009-03-18

    Table of Contents:
  • Understanding the CompressedFolder Class
  • Examining the Properties
  • More on Properties
  • Examining the Exposed Methods

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Understanding the CompressedFolder Class - Examining the Properties


    (Page 2 of 4 )

    My CompressedFolder class needed to have a few basic properties.  I wanted to form them to resemble the properties used by the FileSystemObject’s own Folder object.  I figured this would be the most intuitive way to create my object, by making it easier for users in the end.  Here’s a snapshot of the code I used to create the properties.

       Public Property Get FullName

           FullName = m_fileName  

       End Property

     

       Private Property Let FullName(strName)

           m_fileName = strName

       End Property

     

       Public Property Get Filename

           Filename = Right(FullName, Len(FullName) - InStrRev(FullName, ""))

       End Property

     

       Public Property Get Path

           Path = Left(FullName, InStrRev(FullName, ""))

       End Property

     

       Public Property Get Count

           Count = GetItemCount(FullName)

       End Property

    As you can see, there are four different properties available: FullName, Filename, Path, and Count.  The first three all deal with the path and filename of the compressed folder, and the last returns the number of items in the compressed folder.

    I wanted to provide these specific properties to make coding with my object easier for the programmer.

    Since the first three properties were closely related, I decided to code them together, building each one off of the next.  This eliminated extraneous calls to outside objects, which should hopefully increase my class’s performance.  In this case, a few simple string manipulations are also less complicated than second and third calls to the FileSystemObject for each of the subsequent properties.

    More Code Examples Articles
    More By Nilpo


     

    CODE EXAMPLES ARTICLES

    - Bipartite Graphs
    - Connectivity in Graphs
    - The Ford-Fulkerson Algorithm
    - Critical Paths
    - The Bellman-Ford and Roy-Floyd Algorithms
    - Shortest Path Algorithms in Graphs
    - Minimum Spanning Tree
    - Articulation Edges and Vertexes
    - Circles and Connectivity in Graphs
    - Depth-First Search in Graphs
    - Breadth-First Search in Graphs
    - The Prufer Code and the Floyd-Warshall Algor...
    - An Insight into Graphs
    - Coding a Custom Object with WSC
    - Creating a Custom Object with WSC





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek