Back to index

lightning-sunbird  0.9+nobinonly
Public Types | Static Public Member Functions | Private Member Functions
Silverstone.Manticore.Core.FileLocator Class Reference

Locate special folders. More...

List of all members.

Public Types

enum  SpecialFolders
 All the special folders. This is just copied from Windows headers so that clients can use this namespace and obtain folder ids without having to use Shell32.dll. More...

Static Public Member Functions

static String GetFolderPath (SpecialFolders aFolder)
static String GetManticorePath (String aPath)

Private Member Functions

static int SHGetFolderPath (int aOwningWnd, int nFolder, int aToken, int aFlags, StringBuilder buffer)

Detailed Description

Locate special folders.

Definition at line 50 of file FileLocator.cs.


Member Enumeration Documentation

All the special folders. This is just copied from Windows headers so that clients can use this namespace and obtain folder ids without having to use Shell32.dll.

Definition at line 59 of file FileLocator.cs.

                               : uint
    {
      ssfDESKTOP = 0,
      ssfPROGRAMS = 0x2,
      ssfCONTROLS = 0x3,
      ssfPRINTERS = 0x4,
      ssfPERSONAL = 0x5,
      ssfFAVORITES = 0x6,
      ssfSTARTUP = 0x7,
      ssfRECENT = 0x8,
      ssfSENDTO = 0x9,
      ssfBITBUCKET = 0xa,
      ssfSTARTMENU = 0xb,
      ssfDESKTOPDIRECTORY = 0x10,
      ssfDRIVES = 0x11,
      ssfNETWORK = 0x12,
      ssfNETHOOD = 0x13,
      ssfFONTS = 0x14,
      ssfTEMPLATES = 0x15,
      ssfCOMMONSTARTMENU = 0x16,
      ssfCOMMONPROGRAMS = 0x17,
      ssfCOMMONSTARTUP = 0x18,
      ssfCOMMONDESKTOPDIR = 0x19,
      ssfAPPDATA = 0x1a,
      ssfPRINTHOOD = 0x1b,
      ssfLOCALAPPDATA = 0x1c,
      ssfALTSTARTUP = 0x1d,
      ssfCOMMONALTSTARTUP = 0x1e,
      ssfCOMMONFAVORITES = 0x1f,
      ssfINTERNETCACHE = 0x20,
      ssfCOOKIES = 0x21,
      ssfHISTORY = 0x22,
      ssfCOMMONAPPDATA = 0x23,
      ssfWINDOWS = 0x24,
      ssfSYSTEM = 0x25,
      ssfPROGRAMFILES = 0x26,
      ssfMYPICTURES = 0x27,
      ssfPROFILE = 0x28
    }

Member Function Documentation

Definition at line 99 of file FileLocator.cs.

    {
      StringBuilder builder = new StringBuilder(256);
      SHGetFolderPath(0, (int) aFolder, 0, 0, builder);
      return builder.ToString();
    }

Here is the caller graph for this function:

Definition at line 106 of file FileLocator.cs.

    {
      String path = "";
      String appData = "";
      switch (aPath) 
      {
        case "AppData":
          path = FileLocator.GetFolderPath(FileLocator.SpecialFolders.ssfAPPDATA);
          path += @"\Manticore\";
          break;
        case "UserPrefs":
          appData = FileLocator.GetManticorePath("AppData");
          path += appData + @"user-prefs.xml";
          break;
        case "LocalBookmarks":
          appData = FileLocator.GetManticorePath("AppData");
          if (appData != "")
            path += appData + @"bookmarks.xml";
          break;
        case "Application":
          path = Application.ExecutablePath;
          int lastSlash = path.LastIndexOf(@"\");
          path = path.Substring(0, lastSlash + 1);
          break;
      }
      return path;
    }

Here is the call graph for this function:

Here is the caller graph for this function:

static int Silverstone.Manticore.Core.FileLocator.SHGetFolderPath ( int  aOwningWnd,
int  nFolder,
int  aToken,
int  aFlags,
StringBuilder  buffer 
) [private]

The documentation for this class was generated from the following file: