FileSystem Web Service

Document created by resplin Employee on Jun 6, 2015
Version 1Show Document
  • View in full screen mode

Obsolete Pages{{Obsolete}}

The official documentation is at: http://docs.alfresco.com



Web ServicesBack to Alfresco Content Management Web Services.




NOTE:  This web service is not yet implemented

The FileSystem web service contains helpful methods that allow the easy manipulation of files (nodes of type folder) and files (nodes of type content).


Data Types


FileSystemItemType


An enum of the file system item types.


  • FILE
  • FOLDER

FileSystemItem


  • Reference reference - the reference
  • FileSystemItemType type - the type of file system item
  • string name - the name of the file system item
  • date createdDate - the creation date of the file system item
  • date modifiedDate - the last modified date of the file system item
  • NamedValue[] properties - the properties of the file system item

Methods


getFileSystemInfo


Get the file system info for a reference.

FileSystemInfo getFileSystemInfo(Reference reference)

Parameters:


  • reference - a reference to a file or folder

Return:


  • the file system info object for the reference

list


List the children of a file or folder.

FileSystemInfo[] list(Reference parentReference, FileSystemInfoType filter)

Parameters:


  • parentReference- the reference of the parent folder (must be a node of type folder)
  • filter - indicates the type of file system info that should be returned by list.  This parameter is optional, if it not specifed then all child files and folders are returned.

Return:


  • an array of file system info objects relating to the children of the passed parent reference, filtered by type if specified.

search


Peform a search against the name of the files of folders within a hierarchy.  Wildcard characters are * and ?.

FileSystemInfo[] search(Reference contextReference, stirng namePattern, FileSystemInfoType filter, boolean includeSubFolders)

Parameters:


  • contextReference - the context of the search.  This reference will not be returned as part of the results.
  • namePattern - the name of the file or folder ro search for.  Wildcard expressions are excepted.
  • filter - indicates the type of the file system info that should be returned in the search results.  This parameter is optional, if it is not specified the no filtering of search results will take place.
  • includeSubFolders - true to serach the entire hierarchy below the search context

Return:


  • the results of the search

rename


Rename a file or folder is its current location.

FileSystemInfo rename(Reference reference, string newName)

Parameters:


  • reference - reference to the file or folder to rename
  • newName - the new name

Return:


  • the new file system info

move


Move a file or folder to a new location and optionally rename.

FileSystemInfo move(Reference reference, Reference destination, string newName)

Parameters:


  • reference - reference to the file or folder to move
  • destination - reference to the folder that is the destination of the move
  • newName - the new name if the moved file or folder is to renamed.  Do not set if you want the moved file or folder to retain the same name.

Return:


  • the new file system info

copy


Copy a file or folder to a new location and optionally rename.

FileSystemInfo copy(Reference reference, Reference destination, string newName)

Parameters:


  • reference - reference to the file or folder to copy
  • destination - reference to the folder that is the destination of the copy
  • newName - the new name if the copied file or folder is to renamed.  Do not set if you want the copied file or folder to retain the same name.

Return:


  • the new file system info

create


Create a new file or folder in a desintation folder.

FileSystemInfo create(Reference parent, string name, string type)

Parameters:


  • parent - reference to the parent folder
  • name - the name of the new file or folder
  • type - the type of new file or folder to create.  These must be of type file, content or a sub-type of either.  This is the string representation of the type QName.

Return:


  • file info for the new file or folder

Attachments

    Outcomes