home *** CD-ROM | disk | FTP | other *** search
- package netscape.softupdate;
-
- final class FolderSpec {
- private String folderID;
- private String versionRegistryPath;
- private String userPackageName;
- private String urlPath;
-
- FolderSpec(String var1, String var2, String var3) {
- this.folderID = var1;
- this.versionRegistryPath = var2;
- this.userPackageName = var3;
-
- try {
- this.SetDirectoryPath();
- } catch (SoftUpdateException var4) {
- this.urlPath = null;
- }
- }
-
- void SetDirectoryPath() throws SoftUpdateException {
- if (this.folderID.equalsIgnoreCase("User Pick")) {
- this.urlPath = this.PickDefaultDirectory();
- } else if (this.folderID.equalsIgnoreCase("Installed")) {
- this.urlPath = this.versionRegistryPath;
- } else {
- this.urlPath = this.NativeGetDirectoryPath(this.folderID);
- }
- }
-
- String GetDirectoryPath() {
- return this.urlPath;
- }
-
- String MakeFullPath(String var1) throws SoftUpdateException {
- String var2 = this.GetDirectoryPath() + this.GetNativePath(var1);
- return var2;
- }
-
- private native String NativeGetDirectoryPath(String var1);
-
- private native String GetNativePath(String var1);
-
- private String PickDefaultDirectory() throws SoftUpdateException {
- this.urlPath = this.NativePickDefaultDirectory();
- if (this.urlPath == null) {
- throw new SoftUpdateException(this.folderID, -219);
- } else {
- return this.urlPath;
- }
- }
-
- private native String NativePickDefaultDirectory() throws SoftUpdateException;
-
- boolean IsJavaCapable() {
- return this.NativeIsJavaDir();
- }
-
- private native boolean NativeIsJavaDir();
-
- public String toString() {
- String var1 = this.GetDirectoryPath();
- return var1;
- }
- }
-