Inside and Out...

An attempt to understand technology better...

  Home  |   Contact  |   Syndication    |   Login
  160 Posts | 0 Stories | 12 Comments | 185 Trackbacks

News


WinToolZone - Spelunking Microsoft Technologies
I work as a developer on the Common Language Runtime (CLR) team, specifically in the areas of exception handling and CLR hosting.
Disclaimer

The information in this weblog is provided "AS IS" with no warranties, and confers no rights. This weblog does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion. Inappropriate comments will be deleted at the authors discretion. All code samples are provided "AS IS" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

Tag Cloud


Archives

Post Categories

Image Galleries

Links

Continuing my development on CERapi, I have added some functionality to this managed RAPI library:

  • Implemented CEFileSystem class that allows you to copy and move files from the desktop to the Windows CE device.
  • Implemented CEFolder class that encapsulates a Windows CE device's folder to easily retrieve folder details like contained files, sub folders, create/delete subfolders, etc. The following code illustrates its use:

    // Working with device folders

    CEFolder rootFolder = new CEFolder("\\My Documents\\Demo");

    Console.WriteLine("Path: {0}",rootFolder.Path);

    Console.WriteLine("Total Files: {0}",rootFolder.TotalFileCount);

    Console.WriteLine("Total SubFolders: {0}",rootFolder.TotalSubFolderCount);

    string[] arrFolders = rootFolder.SubFolders;

    foreach(string strFolder in arrFolders)

    Console.WriteLine("SubFolder: {0} ",strFolder);

    Console.WriteLine("");

    string[] arrFiles = rootFolder.Files;

    foreach(string strFile in arrFiles)

    Console.WriteLine("File: {0} ",strFile);

    Console.WriteLine("");

    Console.WriteLine("Parent Folder: {0}", rootFolder.ParentFolder);

    Console.WriteLine("Archived: {0}",rootFolder.IsArchive.ToString());

    Console.WriteLine("Created on: {0}",rootFolder.CreationTime.ToString());

    Console.WriteLine("Last Access on: {0}",rootFolder.LastAccessTime.ToString());

    Console.WriteLine("Last Written to on: {0}",rootFolder.LastWriteTime.ToString());

    Console.WriteLine("Size: {0}",rootFolder.Size.ToString());

    Console.WriteLine("Object ID: {0}",rootFolder.OID.ToString());

    Console.WriteLine("CreateFolder: {0}",rootFolder.CreateFolder("SubFolder").ToString());

    Console.WriteLine("DeleteFolder: {0}",rootFolder.DeleteFolder("SubFolder").ToString());

I am beginning work on CEFile class that will represent a file in a folder on the device. Will keep you posted.

posted on Tuesday, March 01, 2005 12:16 PM
Comments have been closed on this topic.