public override bool Rename(string fromPath, string toPath, StreamRenameOptions options, StreamContext context) { try { File.Move(fromPath, toPath); return(true); } catch (UnauthorizedAccessException) { PhpException.Throw(PhpError.Warning, ErrResources.stream_file_access_denied, FileSystemUtils.StripPassword(fromPath)); } catch (IOException) { PhpException.Throw(PhpError.Warning, ErrResources.stream_rename_file_exists, FileSystemUtils.StripPassword(fromPath), FileSystemUtils.StripPassword(toPath)); } catch (Exception e) { PhpException.Throw(PhpError.Warning, ErrResources.stream_error, FileSystemUtils.StripPassword(fromPath), e.Message); } return(false); }
public virtual bool Rename(string fromPath, string toPath, StreamRenameOptions options, StreamContext context) { // int (*rename)(php_stream_wrapper *wrapper, char *url_from, char *url_to, int options, php_stream_context *context TSRMLS_DC); PhpException.Throw(PhpError.Warning, ErrResources.wrapper_op_unsupported, "Rename"); return(false); }
public override bool Rename(string fromPath, string toPath, StreamRenameOptions options, StreamContext context) { try { File.Move(fromPath, toPath); return true; } catch (UnauthorizedAccessException) { PhpException.Throw(PhpError.Warning, ErrResources.stream_file_access_denied, FileSystemUtils.StripPassword(fromPath)); } catch (IOException) { PhpException.Throw(PhpError.Warning, ErrResources.stream_rename_file_exists, FileSystemUtils.StripPassword(fromPath), FileSystemUtils.StripPassword(toPath)); } catch (System.Exception e) { PhpException.Throw(PhpError.Warning, ErrResources.stream_error, FileSystemUtils.StripPassword(fromPath), e.Message); } return false; }
/// <include file='Doc/Wrappers.xml' path='docs/method[@name="Rename"]/*'/> public override bool Rename(string fromPath, string toPath, StreamRenameOptions options, StreamContext context) { return(proxy.Rename(fromPath, toPath, (int)options, null)); }
public virtual bool Rename(string fromPath, string toPath, StreamRenameOptions options, StreamContext context) { // int (*rename)(php_stream_wrapper *wrapper, char *url_from, char *url_to, int options, php_stream_context *context TSRMLS_DC); PhpException.Throw(PhpError.Warning, ErrResources.wrapper_op_unsupported, "Rename"); return false; }