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, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e..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: System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798estatic java.lang.String
assemblyShortName
Assembly name: System.Private.CoreLibstatic 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()
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)
void
MoveTo(java.lang.String destFileName, boolean overwrite)
FileStream
Open(FileMode mode)
FileStream
Open(FileMode mode, FileAccess access)
FileStream
Open(FileMode mode, FileAccess access, FileShare share)
FileStream
Open(FileStreamOptions options)
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
setIsReadOnly(boolean IsReadOnly)
void
setJCOInstance(JCObject instance)
-
Methods inherited from class system.io.FileSystemInfo
CreateAsSymbolicLink, getAttributes, getCreationTime, getCreationTimeUtc, getExists, getExtension, getFullName, getLastAccessTime, getLastAccessTimeUtc, getLastWriteTime, getLastWriteTimeUtc, getLinkTarget, getName, GetObjectData, getUnixFileMode, Refresh, ResolveLinkTarget, setAttributes, setCreationTime, setCreationTimeUtc, setLastAccessTime, setLastAccessTimeUtc, setLastWriteTime, setLastWriteTimeUtc, setUnixFileMode
-
Methods inherited from class system.MarshalByRefObject
GetLifetimeService, InitializeLifetimeService
-
-
-
-
Field Detail
-
assemblyFullName
public static final java.lang.String assemblyFullName
Fully assembly qualified name: System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e- See Also:
- Constant Field Values
-
assemblyShortName
public static final java.lang.String assemblyShortName
Assembly name: System.Private.CoreLib- 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, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, NotSupportedException, CultureNotFoundException, ObjectDisposedException, IndexOutOfRangeException
-
-
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, boolean overwrite) throws java.lang.Throwable, NotSupportedException, ArgumentException, ArgumentNullException, IndexOutOfRangeException, PlatformNotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, OutOfMemoryException, ExternalException, CultureNotFoundException, MethodAccessException, MissingMethodException, MemberAccessException, TargetInvocationException, ObjectDisposedException, IOException
- Throws:
java.lang.Throwable
NotSupportedException
ArgumentException
ArgumentNullException
IndexOutOfRangeException
PlatformNotSupportedException
InvalidOperationException
ArgumentOutOfRangeException
OutOfMemoryException
ExternalException
CultureNotFoundException
MethodAccessException
MissingMethodException
MemberAccessException
TargetInvocationException
ObjectDisposedException
IOException
-
CopyTo
public FileInfo CopyTo(java.lang.String destFileName) throws java.lang.Throwable, ArgumentNullException, ArgumentException, IndexOutOfRangeException, PlatformNotSupportedException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, MethodAccessException, MissingMethodException, MemberAccessException, TargetInvocationException, IOException
- Throws:
java.lang.Throwable
ArgumentNullException
ArgumentException
IndexOutOfRangeException
PlatformNotSupportedException
NotSupportedException
InvalidOperationException
ArgumentOutOfRangeException
CultureNotFoundException
MethodAccessException
MissingMethodException
MemberAccessException
TargetInvocationException
IOException
-
Replace
public FileInfo Replace(java.lang.String destinationFileName, java.lang.String destinationBackupFileName, boolean ignoreMetadataErrors) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, IndexOutOfRangeException, OutOfMemoryException, ExternalException, CultureNotFoundException
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
ArgumentNullException
IndexOutOfRangeException
OutOfMemoryException
ExternalException
CultureNotFoundException
-
Replace
public FileInfo Replace(java.lang.String destinationFileName, java.lang.String destinationBackupFileName) throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentNullException, IndexOutOfRangeException, PlatformNotSupportedException, CultureNotFoundException
-
Create
public FileStream Create() throws java.lang.Throwable, NotSupportedException, ArgumentException, IndexOutOfRangeException, PlatformNotSupportedException, CultureNotFoundException, OutOfMemoryException, ExternalException, ArgumentNullException, ArgumentOutOfRangeException, InvalidOperationException, SerializationException
-
Open
public FileStream Open(FileMode mode, FileAccess access, FileShare share) throws java.lang.Throwable, NotSupportedException, ArgumentException, IndexOutOfRangeException, PlatformNotSupportedException, CultureNotFoundException, OutOfMemoryException, ExternalException, ArgumentNullException, ArgumentOutOfRangeException, InvalidOperationException, SerializationException
-
Open
public FileStream Open(FileMode mode, FileAccess access) throws java.lang.Throwable, IndexOutOfRangeException, PlatformNotSupportedException, ArgumentNullException, ArgumentException, OutOfMemoryException, ExternalException, InvalidOperationException, CultureNotFoundException, ArgumentOutOfRangeException, SerializationException
-
Open
public FileStream Open(FileMode mode) throws java.lang.Throwable, IndexOutOfRangeException, PlatformNotSupportedException, ArgumentNullException, ArgumentException, OutOfMemoryException, ExternalException, InvalidOperationException, CultureNotFoundException, ArgumentOutOfRangeException, SerializationException
-
Open
public FileStream Open(FileStreamOptions options) throws java.lang.Throwable, NotSupportedException, ArgumentException, IndexOutOfRangeException, PlatformNotSupportedException, CultureNotFoundException, OutOfMemoryException, ExternalException, ArgumentNullException, ArgumentOutOfRangeException, InvalidOperationException, SerializationException, IOException
-
OpenRead
public FileStream OpenRead() throws java.lang.Throwable, NotSupportedException, ArgumentException, IndexOutOfRangeException, PlatformNotSupportedException, CultureNotFoundException, OutOfMemoryException, ExternalException, ArgumentNullException, ArgumentOutOfRangeException, InvalidOperationException, SerializationException, IOException
-
OpenWrite
public FileStream OpenWrite() throws java.lang.Throwable, NotSupportedException, ArgumentException, IndexOutOfRangeException, PlatformNotSupportedException, CultureNotFoundException, OutOfMemoryException, ExternalException, ArgumentNullException, ArgumentOutOfRangeException, InvalidOperationException, SerializationException
-
OpenText
public StreamReader OpenText() throws java.lang.Throwable, NotSupportedException, ArgumentException, IndexOutOfRangeException, PlatformNotSupportedException, CultureNotFoundException, OutOfMemoryException, ExternalException, ArgumentNullException, ArgumentOutOfRangeException, InvalidOperationException
-
AppendText
public StreamWriter AppendText() throws java.lang.Throwable, IndexOutOfRangeException, PlatformNotSupportedException, ArgumentNullException, ArgumentException, OutOfMemoryException, ExternalException, InvalidOperationException, CultureNotFoundException, ArgumentOutOfRangeException
-
CreateText
public StreamWriter CreateText() throws java.lang.Throwable, IndexOutOfRangeException, PlatformNotSupportedException, ArgumentNullException, ArgumentException, OutOfMemoryException, ExternalException, InvalidOperationException, CultureNotFoundException, ArgumentOutOfRangeException
-
Decrypt
public void Decrypt() throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentNullException, IndexOutOfRangeException, PlatformNotSupportedException, CultureNotFoundException
-
Delete
public void Delete() throws java.lang.Throwable, IndexOutOfRangeException, PlatformNotSupportedException, ArgumentNullException, ArgumentException, CultureNotFoundException, InvalidOperationException, ArgumentOutOfRangeException, ArrayTypeMismatchException, FormatException, OutOfMemoryException
- Overrides:
Delete
in classFileSystemInfo
- Throws:
java.lang.Throwable
IndexOutOfRangeException
PlatformNotSupportedException
ArgumentNullException
ArgumentException
CultureNotFoundException
InvalidOperationException
ArgumentOutOfRangeException
ArrayTypeMismatchException
FormatException
OutOfMemoryException
-
Encrypt
public void Encrypt() throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentNullException, IndexOutOfRangeException, PlatformNotSupportedException, CultureNotFoundException
-
MoveTo
public void MoveTo(java.lang.String destFileName, boolean overwrite) throws java.lang.Throwable, NotSupportedException, ArgumentException, ArgumentNullException, IndexOutOfRangeException, PlatformNotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, OutOfMemoryException, ExternalException, CultureNotFoundException, DirectoryNotFoundException, FileNotFoundException
- Throws:
java.lang.Throwable
NotSupportedException
ArgumentException
ArgumentNullException
IndexOutOfRangeException
PlatformNotSupportedException
InvalidOperationException
ArgumentOutOfRangeException
OutOfMemoryException
ExternalException
CultureNotFoundException
DirectoryNotFoundException
FileNotFoundException
-
MoveTo
public void MoveTo(java.lang.String destFileName) throws java.lang.Throwable, ArgumentNullException, ArgumentException, IndexOutOfRangeException, PlatformNotSupportedException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, ArrayTypeMismatchException, DirectoryNotFoundException, FileNotFoundException
-
getIsReadOnly
public boolean getIsReadOnly() throws java.lang.Throwable, IndexOutOfRangeException, PlatformNotSupportedException, ArgumentOutOfRangeException, InvalidOperationException, ArgumentException, OutOfMemoryException, MissingMethodException, TargetInvocationException, FormatException
-
setIsReadOnly
public void setIsReadOnly(boolean IsReadOnly) throws java.lang.Throwable, IndexOutOfRangeException, PlatformNotSupportedException, ArgumentOutOfRangeException, InvalidOperationException, ArgumentException, OutOfMemoryException, MissingMethodException, TargetInvocationException, FormatException
-
getLength
public long getLength() throws java.lang.Throwable, IndexOutOfRangeException, PlatformNotSupportedException, ArgumentOutOfRangeException, InvalidOperationException, ArgumentException, OutOfMemoryException, MissingMethodException, TargetInvocationException, FormatException, FileNotFoundException
-
getDirectory
public DirectoryInfo getDirectory() throws java.lang.Throwable, IndexOutOfRangeException, PlatformNotSupportedException, ArgumentOutOfRangeException, InvalidOperationException, ArrayTypeMismatchException, ArgumentException, NotSupportedException, CultureNotFoundException
-
getDirectoryName
public java.lang.String getDirectoryName() throws java.lang.Throwable, NotSupportedException, ArgumentException, IndexOutOfRangeException, PlatformNotSupportedException, ArgumentNullException, ArgumentOutOfRangeException
-
-