팩토리 » Api
  
xplusfileread
  
Description
해당 하는 텍스트 파일에 내용을 읽어들이는 API이다.
파일이 존재하지 않는 경우, 파일선택다이얼로그를 표시한다.
 
  
Parameters
  
    
      | Parameters | 
      Type | 
      Description | 
    
  
  
        
    
        | strFilePath | 
        STRING | 
 	파일 경로 | 
      
    
    
        | strCharSet | 
        STRING | 
 	읽어올 캐릭터셋 지정[옵션] | 
      
  
  
Return Value
  
    
      | Type | 
      Description | 
    
  
  
    
      | STRING | 
      읽어들인 TEXT 파일 내용 | 
    
  
Remark
** 해당 API는 텍스트 형태의 파일만 읽어들이기 가능합니다. 그 외의 파일은 읽어드리는 도중 내용이 잘려서 반환될 수 있습니다.
** strCharSet 파라미터
읽어올 캐릭터셋으로 아래값 입력 가능, 값을 주지 않을경우 Default ANSI로 읽기
"UTF16/UCS-2" : utf16 으로 읽기
"UTF8"        : utf8로 읽기
  * 참고
    파일에 BOM(Byte Order Mark)정보가 있는 경우는 해당정보에 맞추어 읽음
  
 
  
Example
function btnTest_on_mouseup()
{
	// 텍스트 파일의 내용을 읽어 변수 저장.
	var strContent = factory.xplusfileread("c:\\xFrame\\test.txt");
}
  
See Also
xplusfiledelete
xplusfilewrite
xplusfilefind
xplusfilecopy
  
Viewer Ver.
9.1.1.1
  
Update Date
 20200813