public class FileDescription extends Object
Represents a container for file description.
Constructor and Description |
---|
FileDescription()
Constructor for unit tests
|
FileDescription(String guid)
Initializes a new instance of the FileDescription class.
|
FileDescription(String guid,
boolean isDirectory)
Initializes a new instance of the FileDescription class.
|
FileDescription(String guid,
String name)
Initializes a new instance of the FileDescription class.
|
FileDescription(String guid,
String name,
boolean isDirectory)
Initializes a new instance of the FileDescription class.
|
Modifier and Type | Method and Description |
---|---|
String |
getBaseName()
Gets base name of the document.
|
int |
getDocType()
The type of the document.
|
String |
getDocumentType()
Type of the document.
|
String |
getDocumentTypeFormat()
The document type format.
|
String |
getExtension()
Gets the file extension.
|
String |
getFileType()
The type of the file.
|
String |
getGuid()
The file unique identifier, full path for local storage e.g.
|
Date |
getLastModificationDate()
The last modification date.
|
com.aspose.ms.System.DateTime |
getLastModificationDateInternal()
Gets last modification date internal.
|
String |
getName()
The file name.
|
long |
getSize()
The size in bytes.
|
boolean |
isDirectory()
Indicates whether file or folder.
|
void |
setDirectory(boolean value)
Indicates whether file or folder.
|
void |
setGuid(String value)
The file unique identifier, full path for local storage e.g.
|
void |
setLastModificationDate(Date value)
The last modification date.
|
void |
setLastModificationDateInternal(com.aspose.ms.System.DateTime value)
Sets last modification date internal.
|
void |
setName(String value)
The file name.
|
void |
setSize(long value)
The size in bytes.
|
public FileDescription()
Constructor for unit tests
public FileDescription(String guid)
Initializes a new instance of the FileDescription class. IsDirectory flag will be set to false.
guid
- The file unique identifier, full path for local storage e.g. c:\\storage\\document.txt, relative path e.g document.txt, url e.g. http://site.com/document.txtpublic FileDescription(String guid, String name)
Initializes a new instance of the FileDescription class. IsDirectory flag will be set to false.
guid
- The file unique identifier, full path for local storage e.g. c:\\storage\\document.txt, relative path e.g document.txt, url e.g. http://site.com/document.txtname
- File name with extensionpublic FileDescription(String guid, boolean isDirectory)
Initializes a new instance of the FileDescription class. IsDirectory flag will be set to false.
guid
- The file unique identifier, full path for local storage e.g. c:\\storage\\document.txt, relative path e.g document.txt, url e.g. http://site.com/document.txtisDirectory
- Indicates whether file or folderpublic FileDescription(String guid, String name, boolean isDirectory)
Initializes a new instance of the FileDescription class.
guid
- The file unique identifier, full path for local storage e.g. c:\\storage\\document.txt, relative path e.g document.txt, url e.g. http://site.com/document.txtname
- File name with extensionisDirectory
- Indicates whether file or folderpublic String getGuid()
The file unique identifier, full path for local storage e.g. c:\\storage\\document.txt, relative path e.g document.txt, url e.g. http://site.com/document.txt
public void setGuid(String value)
The file unique identifier, full path for local storage e.g. c:\\storage\\document.txt, relative path e.g document.txt, url e.g. http://site.com/document.txt
value
- the valuepublic String getName()
The file name.
The following example demonstrates how to set name of the document.String
object.public String getExtension()
Gets the file extension.
The following example demonstrates how to get extension of the file.String
object.public long getSize()
The size in bytes.
public void setSize(long value)
The size in bytes.
value
- a long.public Date getLastModificationDate()
The last modification date.
Date
object.public com.aspose.ms.System.DateTime getLastModificationDateInternal()
public void setLastModificationDate(Date value)
The last modification date.
value
- a Date
object.public void setLastModificationDateInternal(com.aspose.ms.System.DateTime value)
value
- the valuepublic String getBaseName()
Gets base name of the document.
The following example demonstrates how to get base name of the document.String
object.public boolean isDirectory()
Indicates whether file or folder.
public void setDirectory(boolean value)
Indicates whether file or folder.
value
- a boolean.public String getDocumentType()
Type of the document.
DocumentTypeName.WORDS
,
DocumentTypeName.CELLS
,
DocumentTypeName.SLIDES
,
DocumentTypeName.PDF
,
DocumentTypeName.DIAGRAM
,
DocumentTypeName.PROJECT
,
DocumentTypeName.IMAGE
,
DocumentTypeName.TAGGEDIMAGE
,
DocumentTypeName.CAD
.
DocumentTypeName.EMAIL
.
DocumentTypeName.DJVU
.
DocumentTypeName.DICOM
.
DocumentTypeName.UNKNOWN
.public String getFileType()
The type of the file.
public String getDocumentTypeFormat()
The document type format.
Domain.DocumentTypeFormat.PORTABLE_DOCUMENT_FORMAT
, Domain.DocumentTypeFormat.MICROSOFT_WORD
,
Domain.DocumentTypeFormat.MICROSOFT_EXCEL
, Domain.DocumentTypeFormat.MICROSOFT_POWERPOINT
,
Domain.DocumentTypeFormat.MICROSOFT_VISIO
, Domain.DocumentTypeFormat.MICROSOFT_PROJECT
,
Domain.DocumentTypeFormat.MICROSOFT_OUTLOOK
, Domain.DocumentTypeFormat.OPENDOCUMENT_FORMATS
,
Domain.DocumentTypeFormat.RICH_TEXT_FORMAT
, Domain.DocumentTypeFormat.PLAIN_TEXT_FILE
,
Domain.DocumentTypeFormat.COMMA_SEPARATED_VALUES
, Domain.DocumentTypeFormat.HYPERTEXT_MARKUP_LANGUAGE
,
Domain.DocumentTypeFormat.EXTENSIBLE_MARKUP_LANGUAGE
, Domain.DocumentTypeFormat.XML_PAPER_SPECIFICATION
,
Domain.DocumentTypeFormat.IMAGE_FILES
, Domain.DocumentTypeFormat.ELECTRONIC_PUBLICATION
,
Domain.DocumentTypeFormat.WINDOWS_ICON
, Domain.DocumentTypeFormat.DICOM_DRAWING_FILE_FORMAT
,
Domain.DocumentTypeFormat.MOBIPOCKET
or Domain.DocumentTypeFormat.UNKNOWN
public int getDocType()
The type of the document.
Copyright © 2018. All rights reserved.