유 니 버 설 대형 사이트 페이지 정적 화 솔 루 션
public static boolean exists(String filepath,String username,String pwd) throws Exception
{
SmbFile file = new SmbFile("smb://"+username+":"+pwd+"@"+filepath);
try{
return file.exists();
}catch(Exception ex){
return false;
}
}
public static boolean fileRename(String filepath,String newFilename,String username,String pwd)
{
try{
SmbFile f=new SmbFile("smb://"+username+":"+pwd+"@"+filepath);
if(f.isFile()){
String str=filepath.substring(0,filepath.lastIndexOf("/"));
str="smb://"+username+":"+pwd+"@"+str+"/"+newFilename;
f.renameTo(new SmbFile(str));
}else if(f.isDirectory()){
String str=filepath.substring(0,filepath.length()-1);
str=filepath.substring(0,str.lastIndexOf("/"));
str="smb://"+username+":"+pwd+"@"+str+"/"+newFilename;
f.renameTo(new SmbFile(str));
}
return true;
}catch(Exception ex){
return false;
}
}
public static void mkdir(String dir,String username,String pwd)
{
try{
SmbFile f=new SmbFile("smb://"+username+":"+pwd+"@"+dir);
if(!f.exists())
f.mkdir();
}catch(Exception ex)
{
}
}
public static void mkfile(String filepath,String username,String pwd)
{
try
{
SmbFile f=new SmbFile("smb://"+username+":"+pwd+"@"+filepath);
if(!f.exists())
f.createNewFile();
}catch(Exception ex)
{
}
}
public static void mkfile(String filepath,String username,String pwd,String content)
{
try
{
SmbFile f=new SmbFile("smb://"+username+":"+pwd+"@"+filepath);
if(!f.exists())
f.createNewFile();
writeFile(filepath,content,username,pwd);
}catch(Exception ex)
{
}
}
public static boolean isdir(String filepath,String username,String pwd) throws Exception
{
String dir="smb://"+username+":"+pwd+"@"+filepath;
SmbFile f=new SmbFile(dir);
return f.isDirectory();
}
두 번 째 점,페이지 정적 화 는 freemarker 에서 생 성 될 수 있 습 니 다.freemarker 의 사용 은 비교적 간단 합 니 다.저 는 더 이상 말 하지 않 고 세 번 째 점,스케줄 링 센터,또는 정적 화 된 요 구 를 Task 에 저장 합 니 다.그리고 스케줄 러 센터 를 통 해 비동기 적 으로 실행 하면 제 가 블 로그 에서 말 한 다른 글 로 해결 하면 됩 니 다.
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
github pages를 스타 도메인 이용으로 만든다.쉽게 정적 페이지를 hosting 할 수 있는 github의 일 기능입니다. cgi, php 등은 사용할 수 없습니다. jekyll등에서 로컬 작성 cms등 이용해, github에 업로드하는 것으로 가능. 무료로 사...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.