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

Ftp 파일 저장소
Inheritance: FileRepositoryBase
Mostra file Open project: debop/NFramework

Public Methods

Method Description
CreateDirectory ( string path ) : void

디렉터리 존재여부

DeleteFile ( ) : void

파일 삭제

DirectoryExists ( string path ) : bool

디렉터리 존재여부

FileExists ( string fileName ) : bool

파일 존재여부

FtpFileRepository ( string hostname, string username, string password ) : System

생성자

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

저장소에 저장한다.

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

저장소에 저장한다.

Private Methods

Method Description
FindNewFileName ( string filename ) : string

파일을 겹쳐쓰기를 방지하기위해 같은 이름의 파일이 있으면 새로운 파일 이름을 반환한다.

해당 파일을 찾고, 그 파일이 없으면 해당 파일명을 반환하고, 중복되는 파일명이 있으면 "FileName[1].ext" 와 같이 뒤에 인덱스를 붙여서 만든다.

GetDestFile ( string destFile, bool overwrite ) : string

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

Method Details

CreateDirectory() public method

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

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

FtpFileRepository() public method

생성자
public FtpFileRepository ( string hostname, string username, string password ) : System
hostname string ftp host
username string 접속계정 Id
password string 접속계정 Password
return System

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

저장소에 저장한다.
public SaveAs ( Stream stream, string destFile, bool overwrite ) : Task
stream Stream 저장할 Stream
destFile string 대상 파일경로
overwrite bool 덮어쓰기 여부
return Task

SaveAs() public method

저장소에 저장한다.
public SaveAs ( string srcFile, string destFile, bool overwrite ) : Task
srcFile string 원본 파일경로
destFile string 대상 파일경로
overwrite bool 덮어쓰기 여부
return Task