C# Class NSoft.NFramework.Web.Services.FileService.Repositories.DefaultFileRepository

파일저장소 관련 API 제공 서비스
Inheritance: FileRepositoryBase
Mostra file Open project: debop/NFramework

Public Methods

Method Description
CreateDirectory ( string path ) : void

디렉터리 존재여부

DefaultFileRepository ( ) : System

생성자

DefaultFileRepository ( string rootPath, string username = null, string password = null ) : System

생성자

DeleteFile ( ) : void

파일 삭제

DirectoryExists ( string path ) : bool

디렉터리 존재여부

FileExists ( string fileName ) : bool

파일 존재여부

GetFileSize ( string fileName ) : long

파일의 크기를 반환합니다.

GetFileStream ( string fileName ) : Stream

파일의 Stream 을 반환합니다.

GetFiles ( string path ) : string[]

저장한 폴더내에 있는 파일목록을 반환합니다.

GetFullPath ( string fileName ) : string

Root 경로와 해당 경로를 Combine한 경로를 반환합니다.

GetNewFileName ( string fileName ) : string

지정된 파일명이 있다면 새로운 파일명을 생성한다.

SaveAs ( Stream stream, string destFile, bool overwrite ) : Task

저장소에 저장한다.
overwrite:false 인 경우 동일한 파일명이 있는경우 새로운 파일명으로 저장후 파일명을 반환합니다.

SaveAs ( string srcFile, string destFile, bool overwrite ) : Task

저장소에 저장한다.
overwrite:false 인 경우 동일한 파일명이 있는경우 새로운 파일명으로 저장후 파일명을 반환합니다.

Private Methods

Method Description
GetDestFile ( string destFile, bool overwrite ) : string

저장할 파일경로을 반환합니다.

Init ( string rootPath, string username, string password ) : void

초기화

Method Details

CreateDirectory() public method

디렉터리 존재여부
public CreateDirectory ( string path ) : void
path string 경로
return void

DefaultFileRepository() public method

생성자
public DefaultFileRepository ( ) : System
return System

DefaultFileRepository() public method

생성자
public DefaultFileRepository ( string rootPath, string username = null, string password = null ) : System
rootPath string 폴더 Root경로
username string 접속계정 Id
password string 접속계정 Password
return System

DeleteFile() public method

파일 삭제
public DeleteFile ( ) : void
return void

DirectoryExists() public method

디렉터리 존재여부
public DirectoryExists ( string path ) : bool
path string 경로
return bool

FileExists() public method

파일 존재여부
public FileExists ( string fileName ) : bool
fileName string 파일명
return bool

GetFileSize() public method

파일의 크기를 반환합니다.
public GetFileSize ( string fileName ) : long
fileName string 파일경로
return long

GetFileStream() public method

파일의 Stream 을 반환합니다.
public GetFileStream ( string fileName ) : Stream
fileName string 파일경로
return Stream

GetFiles() public method

저장한 폴더내에 있는 파일목록을 반환합니다.
public GetFiles ( string path ) : string[]
path string 경로
return string[]

GetFullPath() public method

Root 경로와 해당 경로를 Combine한 경로를 반환합니다.
public GetFullPath ( string fileName ) : string
fileName string 파일 경로
return string

GetNewFileName() public method

지정된 파일명이 있다면 새로운 파일명을 생성한다.
public GetNewFileName ( string fileName ) : string
fileName string 파일명
return string

SaveAs() public method

저장소에 저장한다.
overwrite:false 인 경우 동일한 파일명이 있는경우 새로운 파일명으로 저장후 파일명을 반환합니다.
public SaveAs ( Stream stream, string destFile, bool overwrite ) : Task
stream Stream 저장할 Stream
destFile string 대상 파일경로
overwrite bool 덮어쓰기 여부
return Task

SaveAs() public method

저장소에 저장한다.
overwrite:false 인 경우 동일한 파일명이 있는경우 새로운 파일명으로 저장후 파일명을 반환합니다.
public SaveAs ( string srcFile, string destFile, bool overwrite ) : Task
srcFile string 원본 파일경로
destFile string 대상 파일경로
overwrite bool 덮어쓰기 여부
return Task