Example #1
0
        public static void RemoveOldNdk(IFileSystem fs, AbsoluteDirectoryPath ndkPath)
        {
            try
            {
                var oldBasePath = Platform.OperatingSystem == OS.Mac
                                        ? PathExtensions.GetEnvironmentPath(Environment.SpecialFolder.Personal)
                                  / new DirectoryName("Library")
                                  / new DirectoryName("Application Support")
                                  / new DirectoryName("Fusetools")
                                  / new DirectoryName("Fuse")
                                  / new DirectoryName("Android")
                                        : PathExtensions.GetEnvironmentPath(Environment.SpecialFolder.LocalApplicationData)
                                  / new DirectoryName("Fusetools")
                                  / new DirectoryName("Fuse")
                                  / new DirectoryName("Android");

                if (ndkPath.IsRootedIn(oldBasePath) && fs.Exists(ndkPath))
                {
                    fs.Delete(ndkPath);
                }
            }
            catch (Exception)
            {
                // We don't care about errors.
            }
        }