Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
 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);
 }
Ejemplo n.º 3
0
 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;
 }
Ejemplo n.º 4
0
 /// <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));
 }
Ejemplo n.º 5
0
 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;
 }