1 Star 0 Fork 1.4K

javaalpha/DocSys

forked from Rainy/DocSys 
加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
OS.java 987 Bytes
一键复制 编辑 原始数据 按行查看 历史
13777479349 提交于 2021-03-08 14:55 +08:00 . 代码结构优化
package com.DocSystem.common;
public class OS {
public final static int UNKOWN = 0;
public final static int Windows = 1;
public final static int Linux = 2;
public final static int MacOS = 3;
protected static boolean isWinOS(Integer OSType) {
if(OSType == OS.Windows){
return true;
}
return false;
}
protected static boolean isWinDiskStr(String Str)
{
if(Str.length() != 2)
{
return false;
}
char endChar = Str.charAt(1);
if(endChar != ':')
{
return false;
}
char diskChar = Str.charAt(0);
if((diskChar >= 'C' && diskChar <= 'Z') ||(diskChar >= 'c' && diskChar <= 'z') )
{
return true;
}
return false;
}
public static boolean isWinDiskChar(String Str)
{
if(Str.length() != 1)
{
return false;
}
char diskChar = Str.charAt(0);
if((diskChar >= 'C' && diskChar <= 'Z') ||(diskChar >= 'c' && diskChar <= 'z') )
{
return true;
}
return false;
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/javaalpha/DocSys.git
git@gitee.com:javaalpha/DocSys.git
javaalpha
DocSys
DocSys
master

搜索帮助