forked from Elara6331/itd
		
	Add -r for rm and -p for mkdir
This commit is contained in:
		
							
								
								
									
										20
									
								
								api/fs.go
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								api/fs.go
									
									
									
									
									
								
							| @@ -2,6 +2,16 @@ package api | ||||
|  | ||||
| import "context" | ||||
|  | ||||
| func (c *Client) RemoveAll(ctx context.Context, paths ...string) error { | ||||
| 	return c.client.Call( | ||||
| 		ctx, | ||||
| 		"FS", | ||||
| 		"RemoveAll", | ||||
| 		paths, | ||||
| 		nil, | ||||
| 	) | ||||
| } | ||||
|  | ||||
| func (c *Client) Remove(ctx context.Context, paths ...string) error { | ||||
| 	return c.client.Call( | ||||
| 		ctx, | ||||
| @@ -22,6 +32,16 @@ func (c *Client) Rename(ctx context.Context, old, new string) error { | ||||
| 	) | ||||
| } | ||||
|  | ||||
| func (c *Client) MkdirAll(ctx context.Context, paths ...string) error { | ||||
| 	return c.client.Call( | ||||
| 		ctx, | ||||
| 		"FS", | ||||
| 		"MkdirAll", | ||||
| 		paths, | ||||
| 		nil, | ||||
| 	) | ||||
| } | ||||
|  | ||||
| func (c *Client) Mkdir(ctx context.Context, paths ...string) error { | ||||
| 	return c.client.Call( | ||||
| 		ctx, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user