xiqiu
3 years ago
4 changed files with 53 additions and 3 deletions
@ -0,0 +1,29 @@
|
||||
package com.fr.design.deeplink; |
||||
|
||||
import com.fr.design.mainframe.DesignerContext; |
||||
import com.fr.file.FileFILE; |
||||
import com.fr.stable.StringUtils; |
||||
import com.fr.stable.os.OperatingSystem; |
||||
|
||||
import java.io.File; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* @author Starryi |
||||
* @version 1.0 |
||||
* Created by Starryi on 2022/1/13 |
||||
*/ |
||||
public class FileOpen4MacDeepLink extends DeepLink { |
||||
@Override |
||||
public boolean accept(String url, String host, String path, Map<String, Object> params) { |
||||
return OperatingSystem.isMacos() && StringUtils.isEmpty(host) && StringUtils.isEmpty(path) && params.isEmpty(); |
||||
} |
||||
|
||||
@Override |
||||
public void run(String url, String host, String path, Map<String, Object> params) { |
||||
File file = new File(url); |
||||
if (file.exists()) { |
||||
DesignerContext.getDesignerFrame().openTemplate(new FileFILE(file)); |
||||
} |
||||
} |
||||
} |
Loading…
Reference in new issue