Stud.IP  4.0
 All Data Structures Namespaces Files Functions Variables Groups
FileSystem Class Reference
Inheritance diagram for FileSystem:
RouteMap

Public Member Functions

 getFileRef ($file_ref_id)
 
 getFileRefData ($file_ref_id)
 
 updateFileData ($file_ref_id)
 
 editFileRef ($file_ref_id)
 
 copyFileRef ($file_ref_id, $destination_folder_id)
 
 moveFileRef ($file_ref_id, $destination_folder_id)
 
 deleteFileRef ($file_ref_id)
 
 uploadFile ($folder_id)
 
 getDefinedFolderTypes ()
 
 getFolder ($folder_id)
 
 createNewFolder ($parent_folder_id)
 
 getFileRefsOfFolder ($folder_id)
 
 getSubfoldersOfFolder ($folder_id)
 
 getFolderPermissions ($folder_id)
 
 editFolder ($folder_id)
 
 copyFolder ($folder_id, $destination_folder_id)
 
 moveFolder ($folder_id, $destination_folder_id)
 
 deleteFolder ($folder_id)
 
 getContentTermsOfUseList ()
 
- Public Member Functions inherited from RouteMap
 __construct ()
 
 init ($router, $route)
 
 paginated ($data, $total, $uri_params=[], $query_params=[])
 
 paginate ($uri_format, $total, $offset=null, $limit=null)
 
 collect ($data)
 
 status ($status)
 
 headers ($headers=[])
 
 body ($body)
 
 contentType ($mime_type, $params=[])
 
 error ($status, $body=null)
 
 etag ($value, $strong_etag=true, $new_resource=null)
 
 expires ($amount, $cache_control=[])
 
 cacheControl ($values)
 
 halt ()
 
 lastModified ($time)
 
 notFound ($body=null)
 
 redirect ($url, $args=null)
 
 sendFile ($_path, $opts=[])
 
 url ($addr, $url_params=null)
 
 urlf ($addr_f, $format_params, $url_params=null)
 
 getRoutes ($http_method=null)
 
 getResponse ()
 

Additional Inherited Members

- Protected Member Functions inherited from RouteMap
 extractConditions ($docblock, $conditions=[])
 
- Protected Attributes inherited from RouteMap
 $router
 
 $route
 
 $data = null
 
 $response
 
 $pagination = false
 
 $offset
 
 $limit
 

Detailed Description

This class implements REST routes for the new Stud.IP file system.

Author
Moritz Strohm stroh.nosp@m.m@da.nosp@m.ta-qu.nosp@m.est..nosp@m.de GNU General Public License Version 2 or later

Partially based upon the Files.php source code from Jan-Hendrik Willms (tleil.nosp@m.ax+s.nosp@m.tudip.nosp@m.@gma.nosp@m.il.co.nosp@m.m) and mluze.nosp@m.na@u.nosp@m.os.de which is also licensed under the terms of the GNU General Public License Version 2 or later.

Member Function Documentation

copyFileRef (   $file_ref_id,
  $destination_folder_id 
)

Copies a file reference.

Postcondition
/file/:file_ref_id/copy/:destination_folder_id
copyFolder (   $folder_id,
  $destination_folder_id 
)

Copies a folder into another folder.

Postcondition
/folder/:folder_id/copy/:destination_folder_id
createNewFolder (   $parent_folder_id)

Creates a new folder inside of another folder and returns the new object on success.

Postcondition
/folder/:parent_folder_id/new_folder
deleteFileRef (   $file_ref_id)

Deletes a file reference.

/file/:file_ref_id

deleteFolder (   $folder_id)

Deletes a folder.

/folder/:folder_id

editFileRef (   $file_ref_id)

Edit a file reference.

/file/:file_ref_id

editFolder (   $folder_id)

Allows editing the name or the description (or both) of a folder.

/folder/:folder_id

getContentTermsOfUseList ( )

Get a collection of all ContentTermsOfUse objects

/studip/content_terms_of_use_list

getDefinedFolderTypes ( )

Returns a list of defined folder types, separated by range type. /studip/file_system/folder_types

getFileRef (   $file_ref_id)

Get a file reference object (metadata) /file/:file_ref_id

getFileRefData (   $file_ref_id)

Get the data of a file by the ID of an associated FileRef object

/file/:file_ref_id/download

getFileRefsOfFolder (   $folder_id)

Get a list with all FileRef objects of a folder. /folder/:folder_id/files

getFolder (   $folder_id)

Get a folder object with its file references, subdirectories and the permissions for the user who has made the API call. /folder/:folder_id

getFolderPermissions (   $folder_id)

Get a list with permissions the current user has for a folder. /folder/:folder_id/permissions

getSubfoldersOfFolder (   $folder_id)

Get a list with all FileRef objects of a folder. /folder/:folder_id/subfolders

moveFileRef (   $file_ref_id,
  $destination_folder_id 
)

Moves a file reference.

Postcondition
/file/:file_ref_id/move/:destination_folder_id
moveFolder (   $folder_id,
  $destination_folder_id 
)

Move a folder into another folder.

Postcondition
/folder/:folder_id/move/:destination_folder_id
updateFileData (   $file_ref_id)

Update file data using a FileReference to it.

Postcondition
/file/:file_ref_id/update
uploadFile (   $folder_id)

Upload file to given folder. file data has to be attached as multipart/form-data

Postcondition
/file/:folder_id

The documentation for this class was generated from the following file: