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.StringassemblyFullNameFully assembly qualified name: mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089static java.lang.StringassemblyShortNameAssembly name: mscorlibstatic java.lang.StringclassNameQualified class name: System.IO.FileInfostatic JCTypeclassTypeThe type managed from JCOBridge.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StreamWriterAppendText()static FileInfocast(IJCOBridgeReflected from)Try to cast theIJCOBridgeReflectedinstance intoFileInfo, a cast assert is made to check if types are compatible.FileInfoCopyTo(java.lang.String destFileName)FileInfoCopyTo(java.lang.String destFileName, boolean overwrite)FileStreamCreate()StreamWriterCreateText()voidDecrypt()voidDelete()voidEncrypt()FileSecurityGetAccessControl()FileSecurityGetAccessControl(AccessControlSections includeSections)DirectoryInfogetDirectory()java.lang.StringgetDirectoryName()booleangetIsReadOnly()java.lang.StringgetJCOAssemblyName()Returns the reflected Assembly namejava.lang.StringgetJCOClassName()Returns the reflected Class namejava.lang.ObjectgetJCOInstance()Returns the instantiated classjava.lang.StringgetJCOObjectName()Returns the reflected Class name used to build the objectJCTypegetJCOType()Returns the instantiated class TypelonggetLength()voidMoveTo(java.lang.String destFileName)FileStreamOpen(FileMode mode)FileStreamOpen(FileMode mode, FileAccess access)FileStreamOpen(FileMode mode, FileAccess access, FileShare share)FileStreamOpenRead()StreamReaderOpenText()FileStreamOpenWrite()FileInfoReplace(java.lang.String destinationFileName, java.lang.String destinationBackupFileName)FileInfoReplace(java.lang.String destinationFileName, java.lang.String destinationBackupFileName, boolean ignoreMetadataErrors)voidSetAccessControl(FileSecurity fileSecurity)voidsetIsReadOnly(boolean IsReadOnly)voidsetJCOInstance(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.ThrowableInternal 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.ThrowableArgumentNullExceptionArgumentExceptionPathTooLongExceptionArgumentOutOfRangeExceptionFileNotFoundExceptionDirectoryNotFoundExceptionUnauthorizedAccessExceptionIOExceptionDriveNotFoundExceptionOperationCanceledExceptionInvalidOperationExceptionNotSupportedException
-
-
Method Detail
-
getJCOAssemblyName
public java.lang.String getJCOAssemblyName()
Description copied from interface:IJCOBridgeReflectedReturns the reflected Assembly name- Specified by:
getJCOAssemblyNamein interfaceIJCOBridgeReflected- Overrides:
getJCOAssemblyNamein classFileSystemInfo- Returns:
- A
Stringrepresenting the Fullname of reflected Assembly
-
getJCOClassName
public java.lang.String getJCOClassName()
Description copied from interface:IJCOBridgeReflectedReturns the reflected Class name- Specified by:
getJCOClassNamein interfaceIJCOBridgeReflected- Overrides:
getJCOClassNamein classFileSystemInfo- Returns:
- A
Stringrepresenting the Fullname of reflected Class
-
getJCOObjectName
public java.lang.String getJCOObjectName()
Description copied from interface:IJCOBridgeReflectedReturns the reflected Class name used to build the object- Specified by:
getJCOObjectNamein interfaceIJCOBridgeReflected- Overrides:
getJCOObjectNamein classFileSystemInfo- Returns:
- A
Stringrepresenting the name used to allocated the object in CLR context
-
getJCOInstance
public java.lang.Object getJCOInstance()
Description copied from interface:IJCOBridgeReflectedReturns the instantiated class- Specified by:
getJCOInstancein interfaceIJCOBridgeReflected- Overrides:
getJCOInstancein classFileSystemInfo- Returns:
- An
Objectrepresenting the CLR instance of the instantiated Class
-
setJCOInstance
public void setJCOInstance(JCObject instance)
- Overrides:
setJCOInstancein classFileSystemInfo
-
getJCOType
public JCType getJCOType()
Description copied from interface:IJCOBridgeReflectedReturns the instantiated class Type- Specified by:
getJCOTypein interfaceIJCOBridgeReflected- Overrides:
getJCOTypein classFileSystemInfo- Returns:
- A
JCTyperepresenting the CLR Type of the instantiated Class
-
cast
public static FileInfo cast(IJCOBridgeReflected from) throws java.lang.Throwable
Try to cast theIJCOBridgeReflectedinstance intoFileInfo, a cast assert is made to check if types are compatible.- Parameters:
from-IJCOBridgeReflectedinstance to be casted- Returns:
FileInfoinstance- 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.ThrowableArgumentNullExceptionArgumentExceptionPathTooLongExceptionArgumentOutOfRangeExceptionFileNotFoundExceptionDirectoryNotFoundExceptionUnauthorizedAccessExceptionIOExceptionDriveNotFoundExceptionOperationCanceledExceptionInvalidOperationExceptionNotSupportedException
-
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.ThrowableArgumentNullExceptionArgumentExceptionPathTooLongExceptionArgumentOutOfRangeExceptionFileNotFoundExceptionDirectoryNotFoundExceptionUnauthorizedAccessExceptionIOExceptionDriveNotFoundExceptionOperationCanceledExceptionInvalidOperationExceptionNotSupportedException
-
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.ThrowableArgumentNullExceptionArgumentExceptionArgumentOutOfRangeExceptionFormatExceptionPathTooLongExceptionFileNotFoundExceptionDirectoryNotFoundExceptionUnauthorizedAccessExceptionIOExceptionDriveNotFoundExceptionOperationCanceledExceptionNotSupportedExceptionInvalidOperationExceptionNullReferenceExceptionSecurityException
-
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.ThrowableArgumentNullExceptionArgumentExceptionArgumentOutOfRangeExceptionFormatExceptionPathTooLongExceptionFileNotFoundExceptionDirectoryNotFoundExceptionUnauthorizedAccessExceptionIOExceptionDriveNotFoundExceptionOperationCanceledExceptionNotSupportedExceptionInvalidOperationExceptionNullReferenceExceptionSecurityException
-
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.ThrowableArgumentNullExceptionArgumentExceptionArgumentOutOfRangeExceptionFormatExceptionPathTooLongExceptionFileNotFoundExceptionDirectoryNotFoundExceptionUnauthorizedAccessExceptionIOExceptionDriveNotFoundExceptionOperationCanceledExceptionNotSupportedExceptionInvalidOperationExceptionNullReferenceExceptionSecurityException
-
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.ThrowableArgumentNullExceptionArgumentExceptionArgumentOutOfRangeExceptionFormatExceptionPathTooLongExceptionFileNotFoundExceptionDirectoryNotFoundExceptionUnauthorizedAccessExceptionIOExceptionDriveNotFoundExceptionOperationCanceledExceptionNotSupportedExceptionInvalidOperationExceptionNullReferenceExceptionSecurityException
-
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.ThrowableArgumentOutOfRangeExceptionArgumentNullExceptionArgumentExceptionFormatExceptionPathTooLongExceptionFileNotFoundExceptionDirectoryNotFoundExceptionUnauthorizedAccessExceptionIOExceptionDriveNotFoundExceptionOperationCanceledExceptionNotSupportedExceptionInvalidOperationExceptionNullReferenceExceptionSecurityException
-
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.ThrowableArgumentNullExceptionArgumentExceptionPathTooLongExceptionArgumentOutOfRangeExceptionFileNotFoundExceptionDirectoryNotFoundExceptionUnauthorizedAccessExceptionIOExceptionDriveNotFoundExceptionOperationCanceledExceptionInvalidOperationExceptionNotSupportedException
-
Delete
public void Delete() throws java.lang.Throwable, ArgumentNullException, ArgumentException, ArgumentOutOfRangeException, FormatException, IndexOutOfRangeException, CultureNotFoundException, InvalidOperationException, NotSupportedException, FileNotFoundException, DirectoryNotFoundException, UnauthorizedAccessException, IOException, PathTooLongException, DriveNotFoundException, OperationCanceledException- Overrides:
Deletein classFileSystemInfo- Throws:
java.lang.ThrowableArgumentNullExceptionArgumentExceptionArgumentOutOfRangeExceptionFormatExceptionIndexOutOfRangeExceptionCultureNotFoundExceptionInvalidOperationExceptionNotSupportedExceptionFileNotFoundExceptionDirectoryNotFoundExceptionUnauthorizedAccessExceptionIOExceptionPathTooLongExceptionDriveNotFoundExceptionOperationCanceledException
-
Encrypt
public void Encrypt() throws java.lang.Throwable, ArgumentNullException, ArgumentException, PathTooLongException, ArgumentOutOfRangeException, FileNotFoundException, DirectoryNotFoundException, UnauthorizedAccessException, IOException, DriveNotFoundException, OperationCanceledException, InvalidOperationException, NotSupportedException- Throws:
java.lang.ThrowableArgumentNullExceptionArgumentExceptionPathTooLongExceptionArgumentOutOfRangeExceptionFileNotFoundExceptionDirectoryNotFoundExceptionUnauthorizedAccessExceptionIOExceptionDriveNotFoundExceptionOperationCanceledExceptionInvalidOperationExceptionNotSupportedException
-
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.ThrowableArgumentNullExceptionArgumentExceptionPathTooLongExceptionArgumentOutOfRangeExceptionOutOfMemoryExceptionIndexOutOfRangeExceptionFileNotFoundExceptionDirectoryNotFoundExceptionUnauthorizedAccessExceptionIOExceptionDriveNotFoundExceptionOperationCanceledExceptionNotSupportedException
-
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.ThrowableArgumentNullExceptionArgumentExceptionPathTooLongExceptionArgumentOutOfRangeExceptionFileNotFoundExceptionDirectoryNotFoundExceptionUnauthorizedAccessExceptionIOExceptionDriveNotFoundExceptionOperationCanceledExceptionInvalidOperationExceptionNotSupportedExceptionOutOfMemoryExceptionPrivilegeNotHeldExceptionInvalidProgramException
-
getIsReadOnly
public boolean getIsReadOnly() throws java.lang.Throwable, ArgumentNullException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentException, NotSupportedException, FileNotFoundException, DirectoryNotFoundException, UnauthorizedAccessException, IOException, PathTooLongException, DriveNotFoundException, OperationCanceledException- Throws:
java.lang.ThrowableArgumentNullExceptionInvalidOperationExceptionArgumentOutOfRangeExceptionArgumentExceptionNotSupportedExceptionFileNotFoundExceptionDirectoryNotFoundExceptionUnauthorizedAccessExceptionIOExceptionPathTooLongExceptionDriveNotFoundExceptionOperationCanceledException
-
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.ThrowableArgumentNullExceptionInvalidOperationExceptionArgumentOutOfRangeExceptionArgumentExceptionNotSupportedExceptionFileNotFoundExceptionDirectoryNotFoundExceptionUnauthorizedAccessExceptionIOExceptionPathTooLongExceptionDriveNotFoundExceptionOperationCanceledException
-
getLength
public long getLength() throws java.lang.Throwable, ArgumentNullException, InvalidOperationException, ArgumentOutOfRangeException, FormatException, ArgumentException, NotSupportedException, FileNotFoundException, DirectoryNotFoundException, UnauthorizedAccessException, IOException, PathTooLongException, DriveNotFoundException, OperationCanceledException- Throws:
java.lang.ThrowableArgumentNullExceptionInvalidOperationExceptionArgumentOutOfRangeExceptionFormatExceptionArgumentExceptionNotSupportedExceptionFileNotFoundExceptionDirectoryNotFoundExceptionUnauthorizedAccessExceptionIOExceptionPathTooLongExceptionDriveNotFoundExceptionOperationCanceledException
-
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.ThrowableArgumentNullExceptionArgumentExceptionArgumentOutOfRangeExceptionPathTooLongExceptionOutOfMemoryExceptionIndexOutOfRangeExceptionNotSupportedExceptionFileNotFoundExceptionDirectoryNotFoundExceptionUnauthorizedAccessExceptionIOExceptionDriveNotFoundExceptionOperationCanceledException
-
-