Java Doc for AbstractFile.java in  » Scripting » oscript-2.10.4 » oscript » fs » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Scripting » oscript 2.10.4 » oscript.fs 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


oscript.fs.AbstractFile

All known Subclasses:   oscript.fs.AbstractAbstractFile,
AbstractFile
public interface AbstractFile (Code)
An interface to be implemented by something that can implement file-like operations. Ie read as a stream, write as a stream.
author:
   Rob Clark (rob@ti.com)




Method Summary
public  booleancanRead()
     Is it possible to read from this file.
public  booleancanWrite()
     Is it possible to write to this file.
public  booleancreateNewFile()
     Create a new empty file, if it does not yet exist.
public  booleandelete()
     Delete this file.
public  booleanexists()
     Tests whether this file exists.
public  StringgetExtension()
     Get the extension, which indicates the type of file.
public  java.io.InputStreamgetInputStream()
     Get an input stream to read from this file.
public  StringgetName()
     Get the name of this file, which is the last component of the complete path.
public  java.io.OutputStreamgetOutputStream(boolean append)
     Get an output stream to write to this file.
public  StringgetPath()
     Get the file path, which globally identifies the file.
public  booleanisDirectory()
     Test whether this file is a directory.
public  booleanisFile()
     Test whether this file is a regular file.
public  longlastModified()
     Return the time of last modification.
public  longlength()
     Return the length of the file in bytes.
public  booleanmkdir()
     If this file does not exist, create it as a directory.
public  booleanmkdirs()
     If this file does not exist, create it as a directory.
public  voidtouch()
     Update the timestamp on this file to the current time.



Method Detail
canRead
public boolean canRead()(Code)
Is it possible to read from this file.



canWrite
public boolean canWrite()(Code)
Is it possible to write to this file.



createNewFile
public boolean createNewFile() throws java.io.IOException(Code)
Create a new empty file, if it does not yet exist. true iff the file does not exist and was successfullycreated.
throws:
  IOException - if error



delete
public boolean delete() throws java.io.IOException(Code)
Delete this file. If this file is a directory, then the directory must be empty. true iff the directory is successfully deleted.
throws:
  IOException - if error



exists
public boolean exists()(Code)
Tests whether this file exists. true iff the file exists



getExtension
public String getExtension()(Code)
Get the extension, which indicates the type of file. Usually the extension is part of the filename, ie. if the extension was os, the filename would end with .os. a string indicating the type of file



getInputStream
public java.io.InputStream getInputStream() throws java.io.IOException(Code)
Get an input stream to read from this file. input stream
throws:
  IOException - if canRead returns true
See Also:   AbstractFile.canRead



getName
public String getName()(Code)
Get the name of this file, which is the last component of the complete path. the file name
See Also:   AbstractFile.getPath



getOutputStream
public java.io.OutputStream getOutputStream(boolean append) throws java.io.IOException(Code)
Get an output stream to write to this file. output stream
throws:
  IOException - if canWrite returns false
See Also:   AbstractFile.canWrite



getPath
public String getPath()(Code)
Get the file path, which globally identifies the file. a unique string
See Also:   AbstractFile.getName



isDirectory
public boolean isDirectory()(Code)
Test whether this file is a directory. true iff this file is a directory



isFile
public boolean isFile()(Code)
Test whether this file is a regular file. A file is a regular file if it is not a directory. true iff this file is a regular file.



lastModified
public long lastModified()(Code)
Return the time of last modification. The meaning of these value is not so important, but the implementation must ensure that a higher value is returned for the more recent version of a given element. Ie. if at some point this returns X, an AbstractFile representing the same "file", but created at a later time, should return X if the file has not been modified, or >X if the file has been modified. larger value indicates more recent modification



length
public long length()(Code)
Return the length of the file in bytes.



mkdir
public boolean mkdir() throws java.io.IOException(Code)
If this file does not exist, create it as a directory. true iff directory successfully created



mkdirs
public boolean mkdirs() throws java.io.IOException(Code)
If this file does not exist, create it as a directory. All necessary parent directories are also created. If this operation fails, it may have successfully created some or all of the parent directories. true iff directory successfully created



touch
public void touch() throws java.io.IOException(Code)
Update the timestamp on this file to the current time.
throws:
  IOException - if error



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.