public interface OneFile
Modifier and Type | Method and Description |
---|---|
OneFile |
copy(OneFolder targetFolder)
Copy this file into the target folder.
|
OneFile |
copy(OneFolder targetFolder,
java.lang.String name)
Copy this file into the target folder.
|
boolean |
delete()
Deletes the current folder.
|
OneDownloadFile |
download(java.io.File targetFile)
Downloads this file into the specified local file handle.
|
java.lang.String |
getCRC32Hash()
Gets the CRC32 value of the file (if available).
|
java.util.HashMap<java.lang.String,DriveUser> |
getCreatedBy()
The created by reference.
|
long |
getCreatedDateTime()
The creation timestamp of this file in unix format.
|
java.lang.String |
getCTag()
Gets the cTag.
|
java.lang.String |
getDownloadUrl()
Returns a URL that can be used to download this file's content.
|
java.lang.String |
getETag()
Gets the eTag.
|
java.lang.String |
getId()
Gets the OneDrive id of the file.
|
java.util.HashMap<java.lang.String,DriveUser> |
getLastModifiedBy()
The last modified reference.
|
long |
getLastModifiedDateTime()
The last modified timestamp of this file.
|
long |
getLastRefresh()
Returns the last refresh time since the folder metadata was fetched from the OneDrive server.
|
java.lang.String |
getMimeType()
Gets the MIME type for the file.
|
java.lang.String |
getName()
Gets the name of the folder.
|
OneFolder |
getParentFolder()
Gets the currents parent folder.
|
java.lang.String |
getRawJson()
Gets the raw JSON which is received from the OneDrive API.
|
java.lang.String |
getSHA1Hash()
Gets the SHA1 hash for the contents of the file (if available).
|
long |
getSize()
Gets the size of this file in bytes.
|
java.lang.String |
getWebUrl()
Gets the URL that displays the resource in the browser.
|
OneFile |
move(OneFolder targetFolder)
Move this file into the target folder.
|
OneFile |
refresh()
Refreshes the metadata of this file.
|
java.lang.String getDownloadUrl()
java.lang.String getCTag()
java.lang.String getETag()
java.lang.String getId()
java.lang.String getName()
long getSize()
java.util.HashMap<java.lang.String,DriveUser> getCreatedBy()
long getCreatedDateTime()
java.util.HashMap<java.lang.String,DriveUser> getLastModifiedBy()
long getLastModifiedDateTime()
long getLastRefresh()
OneFile refresh() throws OneDriveException, java.io.IOException
OneDriveException
java.io.IOException
java.lang.String getCRC32Hash()
java.lang.String getSHA1Hash()
java.lang.String getMimeType()
OneFolder getParentFolder() throws java.io.IOException, OneDriveException
java.io.IOException
OneDriveException
java.lang.String getWebUrl()
OneDownloadFile download(java.io.File targetFile) throws java.io.FileNotFoundException
targetFile
- the local file handle. MUST be writable.java.io.FileNotFoundException
boolean delete() throws java.io.IOException, OneDriveException
OneDriveException
java.io.IOException
OneFile copy(OneFolder targetFolder) throws java.io.IOException, OneDriveException, org.json.simple.parser.ParseException, java.lang.InterruptedException
targetFolder
- destination folderjava.io.IOException
OneDriveException
org.json.simple.parser.ParseException
java.lang.InterruptedException
OneFile copy(OneFolder targetFolder, java.lang.String name) throws java.io.IOException, OneDriveException, org.json.simple.parser.ParseException, java.lang.InterruptedException
targetFolder
- destination foldername
- a new name for the filejava.io.IOException
OneDriveException
org.json.simple.parser.ParseException
java.lang.InterruptedException
OneFile move(OneFolder targetFolder) throws java.lang.InterruptedException, OneDriveException, org.json.simple.parser.ParseException, java.io.IOException
targetFolder
- destination folderjava.lang.InterruptedException
OneDriveException
org.json.simple.parser.ParseException
java.io.IOException
java.lang.String getRawJson()