Working with folders

This package provides a clean way of working with folders.

To work with folders first call ->folders() followed by a method.

Get folder contents

Accepts a folder id defaults to 0, returns an array.

Box::folders()->get($id = 0);

Get files within a folder

Accepts a folder id, returns an array.

Box::folders()->items($id);

Create folder

Accepts name of the folder and the folder id as a parent, defaults to 0 when omitted. Returns an array.

Box::folders()->store($name, $parent = 0);

Rename folder

Accepts the folder id, name of the folder. Optionally set the parent folder. Returns an array.

Box::folders()->update($id, $name, $parent = 0);

Copy folder

Accepts the folder id, the parent folder. Optionally set a new name on copy. Returns an array.

Box::folders()->copy($id, $parent, $name = null);

Delete folder

Accepts the folder id. Returns no output.

Box::folders()->destroy($id);

Get folder collaborations

Accepts the folder id. Returns an array.

Box::folders()->collaborations($id);

Help support the blog so that I can continue creating new content!

Subscribe to my newsletter

Subscribe and get my books and product announcements.

© 2009 - 2022 DC Blog. All code MIT license. All rights reserved.