C# 클래스 Pchp.Library.Streams.FileStreamWrapper

Derived from StreamWrapper, this class provides access to the local filesystem files.
The virtual working directory is handled by the PhpPath class in the Class Library. The absolute path resolution (using the working diretory and the include_path if necessary) and open-basedir check is performed by the PhpStream.ResolvePath method. This wrapper expects the path to be an absolute local filesystem path without the file:// scheme specifier.
상속: StreamWrapper
파일 보기 프로젝트 열기: iolevel/peachpie 1 사용 예제들

공개 메소드들

메소드 설명
Listing ( string path, StreamListingOptions options, StreamContext context ) : string[]
MakeDirectory ( string path, int accessMode, StreamMakeDirectoryOptions options, StreamContext context ) : bool
Open ( Context ctx, string &path, string mode, StreamOpenOptions options, StreamContext context ) : PhpStream
RemoveDirectory ( string path, StreamRemoveDirectoryOptions options, StreamContext context ) : bool
Rename ( string fromPath, string toPath, StreamRenameOptions options, StreamContext context ) : bool
Stat ( string path, StreamStatOptions options, StreamContext context, bool streamStat ) : StatStruct
Unlink ( string path, StreamUnlinkOptions options, StreamContext context ) : bool

비공개 메소드들

메소드 설명
BuildMode ( FileSystemInfo info, FileAttributes attributes, string path ) : FileModeFlags

Creates the UNIX-like file mode depending on the file or directory attributes.

BuildStatStruct ( FileSystemInfo info, FileAttributes attributes, string path ) : StatStruct

Creates a StatStruct from the StatStruct filling the common members (for files and directories) from the given FileSystemInfo class. The size member (numeric index 7) may be filled by the caller for when info is a FileInfo.

According to these outputs (PHP Win32): fstat(somefile.txt): [dev] => 0 [ino] => 0 [mode] => 33206 [nlink] => 1 [uid] => 0 [gid] => 0 [rdev] => 0 [size] => 24 [atime] => 1091131360 [mtime] => 1091051699 [ctime] => 1091051677 [blksize] => -1 [blocks] => -1 stat(somefile.txt): [dev] => 2 [ino] => 0 [mode] => 33206 // 0100666 [nlink] => 1 [uid] => 0 [gid] => 0 [rdev] => 2 [size] => 24 [atime] => 1091129621 [mtime] => 1091051699 [ctime] => 1091051677 [blksize] => -1 [blocks] => -1 stat(somedir): [st_dev] => 2 [st_ino] => 0 [st_mode] => 16895 // 040777 [st_nlink] => 1 [st_uid] => 0 [st_gid] => 0 [st_rdev] => 2 [st_size] => 0 [st_atime] => 1091109319 [st_mtime] => 1091044521 [st_ctime] => 1091044521 [st_blksize] => -1 [st_blocks] => -1

ToStatUnixTimeStamp ( FileSystemInfo info, System.DateTime>.Func utcTimeFunc ) : long

Adjusts UTC time of a file by adding Daylight Saving Time difference. Makes file times working in the same way as in PHP and Windows Explorer.

메소드 상세

Listing() 공개 메소드

public Listing ( string path, StreamListingOptions options, StreamContext context ) : string[]
path string
options StreamListingOptions
context StreamContext
리턴 string[]

MakeDirectory() 공개 메소드

public MakeDirectory ( string path, int accessMode, StreamMakeDirectoryOptions options, StreamContext context ) : bool
path string
accessMode int
options StreamMakeDirectoryOptions
context StreamContext
리턴 bool

Open() 공개 메소드

public Open ( Context ctx, string &path, string mode, StreamOpenOptions options, StreamContext context ) : PhpStream
ctx Pchp.Core.Context
path string
mode string
options StreamOpenOptions
context StreamContext
리턴 PhpStream

RemoveDirectory() 공개 메소드

public RemoveDirectory ( string path, StreamRemoveDirectoryOptions options, StreamContext context ) : bool
path string
options StreamRemoveDirectoryOptions
context StreamContext
리턴 bool

Rename() 공개 메소드

public Rename ( string fromPath, string toPath, StreamRenameOptions options, StreamContext context ) : bool
fromPath string
toPath string
options StreamRenameOptions
context StreamContext
리턴 bool

Stat() 공개 메소드

public Stat ( string path, StreamStatOptions options, StreamContext context, bool streamStat ) : StatStruct
path string
options StreamStatOptions
context StreamContext
streamStat bool
리턴 StatStruct

Unlink() 공개 메소드

public Unlink ( string path, StreamUnlinkOptions options, StreamContext context ) : bool
path string
options StreamUnlinkOptions
context StreamContext
리턴 bool