public override bool RemoveDirectory(string path, StreamRemoveDirectoryOptions options, StreamContext context) { try { // Deletes the directory (but not the contents - must be empty) Directory.Delete(path, false); return(true); } catch (UnauthorizedAccessException) { PhpException.Throw(PhpError.Warning, ErrResources.stream_file_access_denied, FileSystemUtils.StripPassword(path)); } catch (IOException) { // Directory not empty. PhpException.Throw(PhpError.Warning, ErrResources.stream_rmdir_io_error, FileSystemUtils.StripPassword(path)); } return(false); }
public virtual bool RemoveDirectory(string path, StreamRemoveDirectoryOptions options, StreamContext context) { // int (*stream_rmdir)(php_stream_wrapper *wrapper, char *url, int options, php_stream_context *context TSRMLS_DC); PhpException.Throw(PhpError.Warning, ErrResources.wrapper_op_unsupported, "Rmdir"); return(false); }
public virtual bool RemoveDirectory(string path, StreamRemoveDirectoryOptions options, StreamContext context) { // int (*stream_rmdir)(php_stream_wrapper *wrapper, char *url, int options, php_stream_context *context TSRMLS_DC); PhpException.Throw(PhpError.Warning, ErrResources.wrapper_op_unsupported, "Rmdir"); return false; }
/// <include file='Doc/Wrappers.xml' path='docs/method[@name="RemoveDirectory"]/*'/> public override bool RemoveDirectory(string path, StreamRemoveDirectoryOptions options, StreamContext context) { return(proxy.RemoveDirectory(path, (int)options, context)); }
public override bool RemoveDirectory(string path, StreamRemoveDirectoryOptions options, StreamContext context) { try { // Deletes the directory (but not the contents - must be empty) Directory.Delete(path, false); return true; } catch (UnauthorizedAccessException) { PhpException.Throw(PhpError.Warning, ErrResources.stream_file_access_denied, FileSystemUtils.StripPassword(path)); } catch (IOException) { // Directory not empty. PhpException.Throw(PhpError.Warning, ErrResources.stream_rmdir_io_error, FileSystemUtils.StripPassword(path)); } return false; }