Introduction
Track all your files, locally, on CD-ROMs, and on removables. Then take these tiny catalogs with you, along with 'Catalog Now'!
Using the program
The main goal is the serialization of the following classes:
[Serializable()]
public class DirectoryCollection: SortedList
{
public DirectoryCollection() : base() {}
public DirectoryCollection(IDictionary c) : base(c) {}
}
[Serializable()]
public class FilesCollection: SortedList
{
public FilesCollection() : base() {}
public FilesCollection(IDictionary c) : base(c) {}
}
[Serializable()]
public class DirectoryItem
{
public DirectoryCollection subdir;
public FilesCollection files;
public string Name;
public string Comment;
public bool isCompressed = false;
public DirectoryItem(string name)
{
Name = name;
files = new FilesCollection();
subdir = new DirectoryCollection();
}
public DirectoryItem(string name, bool iscompressed)
{
Name = name;
isCompressed = iscompressed;
files = new FilesCollection();
subdir = new DirectoryCollection();
}
}
[Serializable()]
public class FileItem
{
public string Name;
public long Size;
public DateTime Date;
public string Comment;
public FileItem(string name, long size, DateTime date)
{
Name = name;
Size = size;
Date = date;
}
public FileItem(string name, long size, DateTime date, string comment)
{
Name = name;
Size = size;
Date = date;
Comment = comment;
}
}
[Serializable()]
public class CatalogVersion
{
public string Version = "1.0";
}
[Serializable()]
public class CatalogHeader
{
public string VolumeName;
public string VolumeSerialNumber;
public uint DriveType;
public ulong Size;
public ulong FreeSpace;
public DateTime DateofScan;
}
With the BinaryFormatter
and the ICSharpCode.SharpZipLib.dll component, we can compress the catalog.
The scan of the devices is done with the optional read of compressed (.zip) files.
In order to look for a specific file, it is possible to look by name, commentary, date, size, etc.
Enjoy it!.
Credits
- Thanks to Mike Krueger for his works with his #ziplib (SharpZipLib, formerly NZipLib, Zip, GZip, Tar and BZip2 library written entirely in C#).
History
- 05/04/2004: Fix of permission bugs.
- 04/04/2004: Initial version.