This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 7282

Summary: Need API to report the MIME type of the file being created in createData
Product: platform Reporter: Sophie Deng <sdeng>
Component: -- Other --Assignee: issues@platform <issues>
Status: CLOSED INVALID    
Severity: normal CC: markdey, sadhana, sdeng
Priority: P4    
Version: 3.x   
Hardware: Sun   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Sophie Deng 2000-08-04 18:58:46 UTC
I am implementing a version control module for the IDE. A feature that I would
like to implement is to put a new file under version control automatically when
the file is created. My module extends AbstractFilesystem, the createData method
is used to implement this feature. The problem is that at that moment the file
is empty and there is no way for me to check the MIME type of the file being
created to perform a proper version control opertion to check-in the file. I
need a new API to report the MIME type of the file being created in the
filesystem.
Comment 1 Jesse Glick 2000-08-07 17:25:59 UTC
What is wrong with checking the extension (or however you normally determine the
MIME type)? See FileUtil.
Comment 2 Jaroslav Tulach 2000-08-22 15:33:59 UTC
Waiting for reply to question: "What is wrong with checking the extension?"
Comment 3 Sophie Deng 2000-09-01 00:33:59 UTC
FileUtil.getMIMEType will work.