unity 如何打开本地文件夹,并选中文件
public static void OpenDirectory(string path, bool isFile = false)
{
if (string.IsNullOrEmpty(path)) return;
path = path.Replace("/", "\\");
if (isFile)
{
if (!File.Exists(path))
{
Debug.LogError("No File: " + path);
return;
}
path = string.Format("/Select, {0}", path);
}
else
{
if (!Directory.Exists(path))
{
Debug.LogError("No Directory: " + path);
return;
}
}
//可能360不信任
System.Diagnostics.Process.Start("explorer.exe", path);
}
unity 如何打开本地文件夹,并选中文件的更多相关文章
- 在使用webstorm打开本地项目文件夹的html文件时,浏览器提示404错误
错误原因:在使用webstorm打开本地项目文件夹的html文件时,浏览器提示404错误. 错误分析:文件夹命名内包含“+”,此特殊符号导致浏览器解析错误. 改正方案:去掉特殊符号“+”
- c#: 打开文件夹并选中文件
一.常规方法 给定一个文件路径,打开文件夹并定位到文件,通常所用shell命令为:explorer.exe /select,filepath. c#以进程启动之为: if (File.Exists(f ...
- 使用ShellExecute打开文件夹并选中文件
原文链接: http://futurecode.is-programmer.com/posts/24780.html 假设在C:\目录下存在文件a.txt. 打开这个目录是ShellExecute的常 ...
- VC在windows中打开文件夹并选中文件
网上一位前辈高人的一段精髓代码让我眼前一亮…… ShellExecute(NULL, "open", "explorer.exe", "/select ...
- js打开所在文件夹并选中文件
该方法只支持IE. var wsh = new ActiveXObject("WSCript.shell"); var src = "/select," + ...
- [转]C#中调用资源管理器(Explorer.exe)打开指定文件夹 + 并选中指定文件 + 调用(系统默认的播放类)软件(如WMP)打开(播放歌曲等)文件
原文:http://www.crifan.com/csharp_call_explorer_to_open_destinate_folder_and_select_specific_file/ C#中 ...
- C# winform打开文件夹并选中指定文件
例如:打开“E:\Training”文件夹并选中“20131250.html”文件 System.Diagnostics.Process.Start("Explorer.exe", ...
- 使用ShellExecute打开目标文件所在文件夹并选中目标文件
转载:http://blog.csdn.net/chenlycly/article/details/7366364 转载:http://bbs.csdn.net/topics/50440550 She ...
- C#项目打开/保存文件夹/指定类型文件,获取路径
C#项目打开/保存文件夹/指定类型文件,获取路径 转:http://q1q2q363.xiaoxiang.blog.163.com/blog/static/1106963682011722424325 ...
- Unity 从StreamingAssets文件夹和PersistentData文件夹 保存读取AssetBundle资源
项目中的资源一般我们打包成AssetBundle格式 方便我们加载和热更 而AssetBundle文件 一般保存在StreamingAssets文件夹或则PersistentData文件夹 首先我们看 ...
随机推荐
- zabbix--邮件告警报错“Support for SMTP authentication was not compiled in”
zabbix 邮件告警报错“Support for SMTP authentication was not compiled in” 邮件报警失败:Support for SMTP authentic ...
- WPF系列 —— 控件添加依赖属性
依赖属性的概念,用途 ,如何新建与使用.本文用做一个自定义TimePicker控件来演示WPF的依赖属性的简单应用. 先上TimePicker的一个效果图. 概念 和 用途:依赖属性是对传统.net ...
- Win10-无法启动虚拟机
环境:Win10 - 1903 Q1:安装使用Hyper-V后,安装Virtual box新建VM,无法启动 A1:卸载Hyper-V(非必须) 管理员运行ps/cmd bcdedit /set ...
- Beta冲刺阶段博客集合
Beta冲刺阶段博客集合 课程名称:软件工程1916|W(福州大学) 团队名称: 云打印 作业要求: 项目Beta冲刺(团队) 作业目标:作业集合 团队队员 队员学号 队员姓名 个人博客地址 备注 2 ...
- swift修饰符
Declaration Modifiers Declaration modifiers are keywords or context-sensitive keywords that modify t ...
- 修改mysql 8.0.16 root 密码--mac
https://blog.csdn.net/HECTOR_1368391900/article/details/90732097 https://my.oschina.net/u/3251146/bl ...
- 平衡二叉树(Java)
package com.rao.linkList; /** * @author Srao * @className AvlTree * @date 2019/12/3 21:23 * @package ...
- HDU 6091 - Rikka with Match
思路 树形dp,设计状态如下: 设 $dp_u_i_0$表示 以点 u 为根的子树 最大匹配数模 m 为 i 时,且 u 点没有匹配的方案数 DP[u][i][1] 表示 以点 u 为根的子树 最大匹 ...
- Json提取器(Json Extractor)
Variable names:保存的变量名,后面使用${Variable names}引用 JSON Path expressions:调试通过的json path表达式 Match Numbers ...
- js时间练习
编写代码,将当前日期按"2017-12-27 11:11 星期三"格式输出 var t1 = new Date(); console.log(t1.toLocaleString() ...