コード例 #1
0
 public static string GetDatabaseNameFromPath(string path)
 {
     string fileName = new FilePath(path).GetName();
     int extensionPos = fileName.LastIndexOf(".");
     if (extensionPos < 0)
     {
         string message = "Unable to determine database name from path: " + path;
         Log.E(Database.Tag, message);
         throw new ArgumentException(message);
     }
     return Sharpen.Runtime.Substring(fileName, 0, extensionPos);
 }