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文件夹 首先我们看 ...
随机推荐
- seaborn---调色板
一.样式控制 1.set([context,style,palette,font,...]) 一步设定美学参数. 2.axes_style([style,rc]) 返回参数字典,用于绘图的美学风格. ...
- python应用-传入年月日 输出为一年的第几天
ef leap_year(year): return (year//4==0 and year//100!=0) or (year //400==0) def which_day(year,month ...
- Spring Boot 2实现分布式锁——这才是实现分布式锁的正确姿势!
参考资料 网址 Spring Boot 2实现分布式锁--这才是实现分布式锁的正确姿势! http://www.spring4all.com/article/6892
- 在 iTunes Connect 中,无法找到“My Apps”选项
Cannot find "My Apps" option in iTunes Connect, to upload my app on the app-store:stackove ...
- 转载>>去除inline-block元素间间距的N种方法《重》
一.现象描述 真正意义上的inline-block水平呈现的元素间,换行显示或空格分隔的情况下会有间距,很简单的个例子: <input /> <input type="su ...
- shell脚本中大于,大于等于,小于,小于等于、不等于的表示方法
症状:shell中大于,大于等于,小于等于,lt,gt ,ne,ge,le 很对应. 应对方法: 大于 -gt (greater than) 小于 -lt (less than) 大于或等于 -ge ...
- LeetCode 490. The Maze
原题链接在这里:https://leetcode.com/problems/the-maze/ 题目: There is a ball in a maze with empty spaces and ...
- isopod dsl 框架管理kubernetes 配置
isopod 是一个包含了丰富能力的dsl 框架我们可以不用编写yaml 文件来进行k8s 管理 说明 语法类似python,目前移植内置了一些不错的功能kube 方法 vault 集成,helm 集 ...
- 0.学习springmvc补充
一.我的截图中的程序错误: 其中的路径写的是:"/user/testString" 这样写会错误当tomcat中配置的根目录为"/"或” “成功,但当配置为”x ...
- mysql课外积累
where 与 on 的区别 : ON:针对关联表进行条件筛选,不会影响结果集的数量和主表数据. WHERE:针对结果集进行条件筛选,会影响结果集的数量. LIKE声明中的%和_是什么意思? --%对 ...