public override StatStruct Stat(string path, StreamStatOptions options, StreamContext context, bool streamStat) { StatStruct invalid = new StatStruct(); invalid.st_size = -1; Debug.Assert(path != null); // Note: path is already absolute w/o the scheme, the permissions have already been checked. return(PhpPath.HandleFileSystemInfo(invalid, path, (p) => { FileSystemInfo info = null; info = new DirectoryInfo(p); if (!info.Exists) { info = new FileInfo(p); if (!info.Exists) { return invalid; } } return BuildStatStruct(info, info.Attributes, p); })); }
public virtual StatStruct Stat(string path, StreamStatOptions options, StreamContext context, bool streamStat) { // int (*url_stat)(php_stream_wrapper *wrapper, char *url, int flags, php_stream_statbuf *ssb, php_stream_context *context TSRMLS_DC); return(StatUnsupported()); }
/// <include file='Doc/Wrappers.xml' path='docs/method[@name="Stat"]/*'/> /// <remarks> /// <seealso cref="StreamStatOptions"/> for the list of additional options. /// </remarks> public virtual StatStruct Stat(string path, StreamStatOptions options, StreamContext context, bool streamStat) { // int (*url_stat)(php_stream_wrapper *wrapper, char *url, int flags, php_stream_statbuf *ssb, php_stream_context *context TSRMLS_DC); PhpException.Throw(PhpError.Warning, CoreResources.GetString("wrapper_op_unsupported", "Stat")); return(new StatStruct()); }
/// <include file='Doc/Wrappers.xml' path='docs/method[@name="Stat"]/*'/> public override StatStruct Stat(string path, StreamStatOptions options, StreamContext context, bool streamStat) { return(proxy.Stat(path, (int)options, null, streamStat)); }
public override StatStruct Stat(string path, StreamStatOptions options, StreamContext context, bool streamStat) { StatStruct invalid = new StatStruct(); invalid.st_size = -1; Debug.Assert(path != null); // Note: path is already absolute w/o the scheme, the permissions have already been checked. return PhpPath.HandleFileSystemInfo(invalid, path, (p) => { FileSystemInfo info = null; info = new DirectoryInfo(p); if (!info.Exists) { info = new FileInfo(p); if (!info.Exists) { return invalid; } } return BuildStatStruct(info, info.Attributes, p); }); }
public virtual StatStruct Stat(string path, StreamStatOptions options, StreamContext context, bool streamStat) { // int (*url_stat)(php_stream_wrapper *wrapper, char *url, int flags, php_stream_statbuf *ssb, php_stream_context *context TSRMLS_DC); return StatUnsupported(); }