Package system.io
Class FileInfo
- java.lang.Object
-
- All Implemented Interfaces:
IJCOBridgeReflected
public class FileInfo extends FileSystemInfo
The base .NET class managing System.IO.FileInfo, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089..NET documentation at https://docs.microsoft.com/en-us/dotnet/api/System.IO.FileInfo
Powered by JCOBridge: more info at https://www.jcobridge.com
- Author:
- MASES s.r.l https://masesgroup.com
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
assemblyFullName
Fully assembly qualified name: mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089static java.lang.String
assemblyShortName
Assembly name: mscorlibstatic java.lang.String
className
Qualified class name: System.IO.FileInfostatic JCType
classType
The type managed from JCOBridge.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StreamWriter
AppendText()
static FileInfo
cast(IJCOBridgeReflected from)
Try to cast theIJCOBridgeReflected
instance intoFileInfo
, a cast assert is made to check if types are compatible.FileInfo
CopyTo(java.lang.String destFileName)
FileInfo
CopyTo(java.lang.String destFileName, boolean overwrite)
FileStream
Create()
StreamWriter
CreateText()
void
Decrypt()
void
Delete()
void
Encrypt()
FileSecurity
GetAccessControl()
FileSecurity
GetAccessControl(AccessControlSections includeSections)
DirectoryInfo
getDirectory()
java.lang.String
getDirectoryName()
boolean
getIsReadOnly()
java.lang.String
getJCOAssemblyName()
Returns the reflected Assembly namejava.lang.String
getJCOClassName()
Returns the reflected Class namejava.lang.Object
getJCOInstance()
Returns the instantiated classjava.lang.String
getJCOObjectName()
Returns the reflected Class name used to build the objectJCType
getJCOType()
Returns the instantiated class Typelong
getLength()
void
MoveTo(java.lang.String destFileName)
FileStream
Open(FileMode mode)
FileStream
Open(FileMode mode, FileAccess access)
FileStream
Open(FileMode mode, FileAccess access, FileShare share)
FileStream
OpenRead()
StreamReader
OpenText()
FileStream
OpenWrite()
FileInfo
Replace(java.lang.String destinationFileName, java.lang.String destinationBackupFileName)
FileInfo
Replace(java.lang.String destinationFileName, java.lang.String destinationBackupFileName, boolean ignoreMetadataErrors)
void
SetAccessControl(FileSecurity fileSecurity)
void
setIsReadOnly(boolean IsReadOnly)
void
setJCOInstance(JCObject instance)
-
Methods inherited from class system.io.FileSystemInfo
getAttributes, getCreationTime, getCreationTimeUtc, getExists, getExtension, getFullName, getLastAccessTime, getLastAccessTimeUtc, getLastWriteTime, getLastWriteTimeUtc, getName, GetObjectData, Refresh, setAttributes, setCreationTime, setCreationTimeUtc, setLastAccessTime, setLastAccessTimeUtc, setLastWriteTime, setLastWriteTimeUtc
-
Methods inherited from class system.MarshalByRefObject
CreateObjRef, GetLifetimeService, InitializeLifetimeService
-
-
-
-
Field Detail
-
assemblyFullName
public static final java.lang.String assemblyFullName
Fully assembly qualified name: mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089- See Also:
- Constant Field Values
-
assemblyShortName
public static final java.lang.String assemblyShortName
Assembly name: mscorlib- See Also:
- Constant Field Values
-
className
public static final java.lang.String className
Qualified class name: System.IO.FileInfo- See Also:
- Constant Field Values
-
-
Constructor Detail
-
FileInfo
public FileInfo(java.lang.Object instance) throws java.lang.Throwable
Internal constructor. Use with caution- Throws:
java.lang.Throwable
-
FileInfo
public FileInfo() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
FileInfo
public FileInfo(java.lang.String fileName) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PathTooLongException, ArgumentOutOfRangeException, FileNotFoundException, DirectoryNotFoundException, UnauthorizedAccessException, IOException, DriveNotFoundException, OperationCanceledException, InvalidOperationException, NotSupportedException
- Throws:
java.lang.Throwable
ArgumentNullException
ArgumentException
PathTooLongException
ArgumentOutOfRangeException
FileNotFoundException
DirectoryNotFoundException
UnauthorizedAccessException
IOException
DriveNotFoundException
OperationCanceledException
InvalidOperationException
NotSupportedException
-
-
Method Detail
-
getJCOAssemblyName
public java.lang.String getJCOAssemblyName()
Description copied from interface:IJCOBridgeReflected
Returns the reflected Assembly name- Specified by:
getJCOAssemblyName
in interfaceIJCOBridgeReflected
- Overrides:
getJCOAssemblyName
in classFileSystemInfo
- Returns:
- A
String
representing the Fullname of reflected Assembly
-
getJCOClassName
public java.lang.String getJCOClassName()
Description copied from interface:IJCOBridgeReflected
Returns the reflected Class name- Specified by:
getJCOClassName
in interfaceIJCOBridgeReflected
- Overrides:
getJCOClassName
in classFileSystemInfo
- Returns:
- A
String
representing the Fullname of reflected Class
-
getJCOObjectName
public java.lang.String getJCOObjectName()
Description copied from interface:IJCOBridgeReflected
Returns the reflected Class name used to build the object- Specified by:
getJCOObjectName
in interfaceIJCOBridgeReflected
- Overrides:
getJCOObjectName
in classFileSystemInfo
- Returns:
- A
String
representing the name used to allocated the object in CLR context
-
getJCOInstance
public java.lang.Object getJCOInstance()
Description copied from interface:IJCOBridgeReflected
Returns the instantiated class- Specified by:
getJCOInstance
in interfaceIJCOBridgeReflected
- Overrides:
getJCOInstance
in classFileSystemInfo
- Returns:
- An
Object
representing the CLR instance of the instantiated Class
-
setJCOInstance
public void setJCOInstance(JCObject instance)
- Overrides:
setJCOInstance
in classFileSystemInfo
-
getJCOType
public JCType getJCOType()
Description copied from interface:IJCOBridgeReflected
Returns the instantiated class Type- Specified by:
getJCOType
in interfaceIJCOBridgeReflected
- Overrides:
getJCOType
in classFileSystemInfo
- Returns:
- A
JCType
representing the CLR Type of the instantiated Class
-
cast
public static FileInfo cast(IJCOBridgeReflected from) throws java.lang.Throwable
Try to cast theIJCOBridgeReflected
instance intoFileInfo
, a cast assert is made to check if types are compatible.- Parameters:
from
-IJCOBridgeReflected
instance to be casted- Returns:
FileInfo
instance- Throws:
java.lang.Throwable
- in case of error during cast operation
-
CopyTo
public FileInfo CopyTo(java.lang.String destFileName) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PathTooLongException, ArgumentOutOfRangeException, FileNotFoundException, DirectoryNotFoundException, UnauthorizedAccessException, IOException, DriveNotFoundException, OperationCanceledException, InvalidOperationException, NotSupportedException
- Throws:
java.lang.Throwable
ArgumentNullException
ArgumentException
PathTooLongException
ArgumentOutOfRangeException
FileNotFoundException
DirectoryNotFoundException
UnauthorizedAccessException
IOException
DriveNotFoundException
OperationCanceledException
InvalidOperationException
NotSupportedException
-
CopyTo
public FileInfo CopyTo(java.lang.String destFileName, boolean overwrite) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PathTooLongException, ArgumentOutOfRangeException, FileNotFoundException, DirectoryNotFoundException, UnauthorizedAccessException, IOException, DriveNotFoundException, OperationCanceledException, InvalidOperationException, NotSupportedException
- Throws:
java.lang.Throwable
ArgumentNullException
ArgumentException
PathTooLongException
ArgumentOutOfRangeException
FileNotFoundException
DirectoryNotFoundException
UnauthorizedAccessException
IOException
DriveNotFoundException
OperationCanceledException
InvalidOperationException
NotSupportedException
-
Replace
public FileInfo Replace(java.lang.String destinationFileName, java.lang.String destinationBackupFileName) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PathTooLongException, FileNotFoundException, DirectoryNotFoundException, UnauthorizedAccessException, IOException, DriveNotFoundException, OperationCanceledException, NotSupportedException, ArgumentOutOfRangeException
-
Replace
public FileInfo Replace(java.lang.String destinationFileName, java.lang.String destinationBackupFileName, boolean ignoreMetadataErrors) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PathTooLongException, ArgumentOutOfRangeException, IndexOutOfRangeException, NotSupportedException, FormatException, InvalidOperationException
-
Create
public FileStream Create() throws java.lang.Throwable, ArgumentNullException, ArgumentException, ArgumentOutOfRangeException, FormatException, PathTooLongException, FileNotFoundException, DirectoryNotFoundException, UnauthorizedAccessException, IOException, DriveNotFoundException, OperationCanceledException, NotSupportedException, InvalidOperationException, NullReferenceException, SecurityException
- Throws:
java.lang.Throwable
ArgumentNullException
ArgumentException
ArgumentOutOfRangeException
FormatException
PathTooLongException
FileNotFoundException
DirectoryNotFoundException
UnauthorizedAccessException
IOException
DriveNotFoundException
OperationCanceledException
NotSupportedException
InvalidOperationException
NullReferenceException
SecurityException
-
Open
public FileStream Open(FileMode mode) throws java.lang.Throwable, ArgumentNullException, ArgumentException, ArgumentOutOfRangeException, FormatException, PathTooLongException, IndexOutOfRangeException, NotSupportedException, InvalidOperationException, NullReferenceException, SecurityException, IOException
-
Open
public FileStream Open(FileMode mode, FileAccess access) throws java.lang.Throwable, ArgumentNullException, ArgumentException, ArgumentOutOfRangeException, FormatException, PathTooLongException, IndexOutOfRangeException, NotSupportedException, InvalidOperationException, NullReferenceException, SecurityException, IOException
-
Open
public FileStream Open(FileMode mode, FileAccess access, FileShare share) throws java.lang.Throwable, ArgumentNullException, ArgumentException, ArgumentOutOfRangeException, FormatException, PathTooLongException, FileNotFoundException, DirectoryNotFoundException, UnauthorizedAccessException, IOException, DriveNotFoundException, OperationCanceledException, NotSupportedException, InvalidOperationException, NullReferenceException, SecurityException
- Throws:
java.lang.Throwable
ArgumentNullException
ArgumentException
ArgumentOutOfRangeException
FormatException
PathTooLongException
FileNotFoundException
DirectoryNotFoundException
UnauthorizedAccessException
IOException
DriveNotFoundException
OperationCanceledException
NotSupportedException
InvalidOperationException
NullReferenceException
SecurityException
-
OpenRead
public FileStream OpenRead() throws java.lang.Throwable, ArgumentNullException, ArgumentException, ArgumentOutOfRangeException, FormatException, PathTooLongException, FileNotFoundException, DirectoryNotFoundException, UnauthorizedAccessException, IOException, DriveNotFoundException, OperationCanceledException, NotSupportedException, InvalidOperationException, NullReferenceException, SecurityException
- Throws:
java.lang.Throwable
ArgumentNullException
ArgumentException
ArgumentOutOfRangeException
FormatException
PathTooLongException
FileNotFoundException
DirectoryNotFoundException
UnauthorizedAccessException
IOException
DriveNotFoundException
OperationCanceledException
NotSupportedException
InvalidOperationException
NullReferenceException
SecurityException
-
OpenWrite
public FileStream OpenWrite() throws java.lang.Throwable, ArgumentNullException, ArgumentException, ArgumentOutOfRangeException, FormatException, PathTooLongException, FileNotFoundException, DirectoryNotFoundException, UnauthorizedAccessException, IOException, DriveNotFoundException, OperationCanceledException, NotSupportedException, InvalidOperationException, NullReferenceException, SecurityException
- Throws:
java.lang.Throwable
ArgumentNullException
ArgumentException
ArgumentOutOfRangeException
FormatException
PathTooLongException
FileNotFoundException
DirectoryNotFoundException
UnauthorizedAccessException
IOException
DriveNotFoundException
OperationCanceledException
NotSupportedException
InvalidOperationException
NullReferenceException
SecurityException
-
OpenText
public StreamReader OpenText() throws java.lang.Throwable, ArgumentOutOfRangeException, ArgumentNullException, ArgumentException, FormatException, PathTooLongException, FileNotFoundException, DirectoryNotFoundException, UnauthorizedAccessException, IOException, DriveNotFoundException, OperationCanceledException, NotSupportedException, InvalidOperationException, NullReferenceException, SecurityException
- Throws:
java.lang.Throwable
ArgumentOutOfRangeException
ArgumentNullException
ArgumentException
FormatException
PathTooLongException
FileNotFoundException
DirectoryNotFoundException
UnauthorizedAccessException
IOException
DriveNotFoundException
OperationCanceledException
NotSupportedException
InvalidOperationException
NullReferenceException
SecurityException
-
AppendText
public StreamWriter AppendText() throws java.lang.Throwable, ArgumentOutOfRangeException, ArgumentNullException, ArgumentException, PathTooLongException, CultureNotFoundException, NotSupportedException, InvalidOperationException, IndexOutOfRangeException, NullReferenceException, SecurityException, IOException
-
CreateText
public StreamWriter CreateText() throws java.lang.Throwable, ArgumentOutOfRangeException, ArgumentNullException, ArgumentException, PathTooLongException, CultureNotFoundException, NotSupportedException, InvalidOperationException, IndexOutOfRangeException, NullReferenceException, SecurityException, IOException
-
GetAccessControl
public FileSecurity GetAccessControl() throws java.lang.Throwable, ArgumentNullException, ArgumentException, OutOfMemoryException, UnauthorizedAccessException, InvalidOperationException, PrivilegeNotHeldException, SystemException, ArgumentOutOfRangeException, OverflowException, PathTooLongException, IndexOutOfRangeException, NotSupportedException
-
GetAccessControl
public FileSecurity GetAccessControl(AccessControlSections includeSections) throws java.lang.Throwable, ArgumentNullException, ArgumentException, OutOfMemoryException, UnauthorizedAccessException, InvalidOperationException, PrivilegeNotHeldException, SystemException, ArgumentOutOfRangeException, OverflowException, PathTooLongException, IndexOutOfRangeException, NotSupportedException
-
Decrypt
public void Decrypt() throws java.lang.Throwable, ArgumentNullException, ArgumentException, PathTooLongException, ArgumentOutOfRangeException, FileNotFoundException, DirectoryNotFoundException, UnauthorizedAccessException, IOException, DriveNotFoundException, OperationCanceledException, InvalidOperationException, NotSupportedException
- Throws:
java.lang.Throwable
ArgumentNullException
ArgumentException
PathTooLongException
ArgumentOutOfRangeException
FileNotFoundException
DirectoryNotFoundException
UnauthorizedAccessException
IOException
DriveNotFoundException
OperationCanceledException
InvalidOperationException
NotSupportedException
-
Delete
public void Delete() throws java.lang.Throwable, ArgumentNullException, ArgumentException, ArgumentOutOfRangeException, FormatException, IndexOutOfRangeException, CultureNotFoundException, InvalidOperationException, NotSupportedException, FileNotFoundException, DirectoryNotFoundException, UnauthorizedAccessException, IOException, PathTooLongException, DriveNotFoundException, OperationCanceledException
- Overrides:
Delete
in classFileSystemInfo
- Throws:
java.lang.Throwable
ArgumentNullException
ArgumentException
ArgumentOutOfRangeException
FormatException
IndexOutOfRangeException
CultureNotFoundException
InvalidOperationException
NotSupportedException
FileNotFoundException
DirectoryNotFoundException
UnauthorizedAccessException
IOException
PathTooLongException
DriveNotFoundException
OperationCanceledException
-
Encrypt
public void Encrypt() throws java.lang.Throwable, ArgumentNullException, ArgumentException, PathTooLongException, ArgumentOutOfRangeException, FileNotFoundException, DirectoryNotFoundException, UnauthorizedAccessException, IOException, DriveNotFoundException, OperationCanceledException, InvalidOperationException, NotSupportedException
- Throws:
java.lang.Throwable
ArgumentNullException
ArgumentException
PathTooLongException
ArgumentOutOfRangeException
FileNotFoundException
DirectoryNotFoundException
UnauthorizedAccessException
IOException
DriveNotFoundException
OperationCanceledException
InvalidOperationException
NotSupportedException
-
MoveTo
public void MoveTo(java.lang.String destFileName) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PathTooLongException, ArgumentOutOfRangeException, OutOfMemoryException, IndexOutOfRangeException, FileNotFoundException, DirectoryNotFoundException, UnauthorizedAccessException, IOException, DriveNotFoundException, OperationCanceledException, NotSupportedException
- Throws:
java.lang.Throwable
ArgumentNullException
ArgumentException
PathTooLongException
ArgumentOutOfRangeException
OutOfMemoryException
IndexOutOfRangeException
FileNotFoundException
DirectoryNotFoundException
UnauthorizedAccessException
IOException
DriveNotFoundException
OperationCanceledException
NotSupportedException
-
SetAccessControl
public void SetAccessControl(FileSecurity fileSecurity) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PathTooLongException, ArgumentOutOfRangeException, FileNotFoundException, DirectoryNotFoundException, UnauthorizedAccessException, IOException, DriveNotFoundException, OperationCanceledException, InvalidOperationException, NotSupportedException, OutOfMemoryException, PrivilegeNotHeldException, InvalidProgramException
- Throws:
java.lang.Throwable
ArgumentNullException
ArgumentException
PathTooLongException
ArgumentOutOfRangeException
FileNotFoundException
DirectoryNotFoundException
UnauthorizedAccessException
IOException
DriveNotFoundException
OperationCanceledException
InvalidOperationException
NotSupportedException
OutOfMemoryException
PrivilegeNotHeldException
InvalidProgramException
-
getIsReadOnly
public boolean getIsReadOnly() throws java.lang.Throwable, ArgumentNullException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentException, NotSupportedException, FileNotFoundException, DirectoryNotFoundException, UnauthorizedAccessException, IOException, PathTooLongException, DriveNotFoundException, OperationCanceledException
- Throws:
java.lang.Throwable
ArgumentNullException
InvalidOperationException
ArgumentOutOfRangeException
ArgumentException
NotSupportedException
FileNotFoundException
DirectoryNotFoundException
UnauthorizedAccessException
IOException
PathTooLongException
DriveNotFoundException
OperationCanceledException
-
setIsReadOnly
public void setIsReadOnly(boolean IsReadOnly) throws java.lang.Throwable, ArgumentNullException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentException, NotSupportedException, FileNotFoundException, DirectoryNotFoundException, UnauthorizedAccessException, IOException, PathTooLongException, DriveNotFoundException, OperationCanceledException
- Throws:
java.lang.Throwable
ArgumentNullException
InvalidOperationException
ArgumentOutOfRangeException
ArgumentException
NotSupportedException
FileNotFoundException
DirectoryNotFoundException
UnauthorizedAccessException
IOException
PathTooLongException
DriveNotFoundException
OperationCanceledException
-
getLength
public long getLength() throws java.lang.Throwable, ArgumentNullException, InvalidOperationException, ArgumentOutOfRangeException, FormatException, ArgumentException, NotSupportedException, FileNotFoundException, DirectoryNotFoundException, UnauthorizedAccessException, IOException, PathTooLongException, DriveNotFoundException, OperationCanceledException
- Throws:
java.lang.Throwable
ArgumentNullException
InvalidOperationException
ArgumentOutOfRangeException
FormatException
ArgumentException
NotSupportedException
FileNotFoundException
DirectoryNotFoundException
UnauthorizedAccessException
IOException
PathTooLongException
DriveNotFoundException
OperationCanceledException
-
getDirectory
public DirectoryInfo getDirectory() throws java.lang.Throwable, ArgumentNullException, ArgumentException, PathTooLongException, ArgumentOutOfRangeException, FileNotFoundException, DirectoryNotFoundException, UnauthorizedAccessException, IOException, DriveNotFoundException, OperationCanceledException, NotSupportedException
-
getDirectoryName
public java.lang.String getDirectoryName() throws java.lang.Throwable, ArgumentNullException, ArgumentException, ArgumentOutOfRangeException, PathTooLongException, OutOfMemoryException, IndexOutOfRangeException, NotSupportedException, FileNotFoundException, DirectoryNotFoundException, UnauthorizedAccessException, IOException, DriveNotFoundException, OperationCanceledException
- Throws:
java.lang.Throwable
ArgumentNullException
ArgumentException
ArgumentOutOfRangeException
PathTooLongException
OutOfMemoryException
IndexOutOfRangeException
NotSupportedException
FileNotFoundException
DirectoryNotFoundException
UnauthorizedAccessException
IOException
DriveNotFoundException
OperationCanceledException
-
-