Beispiel #1
0
		// Don't allow others to instantiate this class
		/// <summary>Scan a file for OBB information.</summary>
		/// <remarks>Scan a file for OBB information.</remarks>
		/// <param name="filePath">path to the OBB file to be scanned.</param>
		/// <returns>ObbInfo object information corresponding to the file path</returns>
		/// <exception cref="System.ArgumentException">if the OBB file couldn't be found</exception>
		/// <exception cref="System.IO.IOException">if the OBB file couldn't be read</exception>
		public static android.content.res.ObbInfo getObbInfo(string filePath)
		{
			if (filePath == null)
			{
				throw new System.ArgumentException("file path cannot be null");
			}
			java.io.File obbFile = new java.io.File(filePath);
			if (!obbFile.exists())
			{
				throw new System.ArgumentException("OBB file does not exist: " + filePath);
			}
			string canonicalFilePath = obbFile.getCanonicalPath();
			android.content.res.ObbInfo obbInfo = new android.content.res.ObbInfo();
			obbInfo.filename = canonicalFilePath;
			getObbInfo_native(canonicalFilePath, obbInfo);
			return obbInfo;
		}
Beispiel #2
0
        // Don't allow others to instantiate this class
        /// <summary>Scan a file for OBB information.</summary>
        /// <remarks>Scan a file for OBB information.</remarks>
        /// <param name="filePath">path to the OBB file to be scanned.</param>
        /// <returns>ObbInfo object information corresponding to the file path</returns>
        /// <exception cref="System.ArgumentException">if the OBB file couldn't be found</exception>
        /// <exception cref="System.IO.IOException">if the OBB file couldn't be read</exception>
        public static android.content.res.ObbInfo getObbInfo(string filePath)
        {
            if (filePath == null)
            {
                throw new System.ArgumentException("file path cannot be null");
            }
            java.io.File obbFile = new java.io.File(filePath);
            if (!obbFile.exists())
            {
                throw new System.ArgumentException("OBB file does not exist: " + filePath);
            }
            string canonicalFilePath = obbFile.getCanonicalPath();

            android.content.res.ObbInfo obbInfo = new android.content.res.ObbInfo();
            obbInfo.filename = canonicalFilePath;
            getObbInfo_native(canonicalFilePath, obbInfo);
            return(obbInfo);
        }
        // called by?
        public static string __GetFullPath(string e)
        {
            // http://www.devx.com/tips/Tip/13804

            var f = new java.io.File(e);
            var c = default(string);

            try
            {
                c = f.getCanonicalPath();
            }
            catch
            {
                throw;
            }

            return c;
        }
Beispiel #4
0
        // called by?
        public static string __GetFullPath(string e)
        {
            // http://www.devx.com/tips/Tip/13804

            var f = new java.io.File(e);
            var c = default(string);

            try
            {
                c = f.getCanonicalPath();
            }
            catch
            {
                throw;
            }

            return(c);
        }