All Downloads are FREE. Search and download functionalities are using the official Maven repository.

system.io.Directory Maven / Gradle / Ivy

/*
 *  MIT License
 *
 *  Copyright (c) 2024 MASES s.r.l.
 *
 *  Permission is hereby granted, free of charge, to any person obtaining a copy
 *  of this software and associated documentation files (the "Software"), to deal
 *  in the Software without restriction, including without limitation the rights
 *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 *  copies of the Software, and to permit persons to whom the Software is
 *  furnished to do so, subject to the following conditions:
 *
 *  The above copyright notice and this permission notice shall be included in all
 *  copies or substantial portions of the Software.
 *
 *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 *  SOFTWARE.
 */

/**************************************************************************************
 * 
 *      This code was generated from a template using JCOReflector v. 1.14.3.0
 * 
 *      Manual changes to this file may cause unexpected behavior in your application.
 *      Manual changes to this file will be overwritten if the code is regenerated.
 * 
 *************************************************************************************/

package system.io;

import org.mases.jcobridge.*;
import org.mases.jcobridge.netreflection.*;
import java.util.ArrayList;

// Import section
import system.DateTime;
import system.io.DirectoryInfo;
import system.io.UnixFileMode;
import system.io.FileSystemInfo;
import system.io.EnumerationOptions;
import system.io.SearchOption;


/**
 * The base .NET class managing System.IO.Directory, 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.Directory *

* * Powered by JCOBridge: more info at https://www.jcobridge.com * * @author MASES s.r.l https://masesgroup.com * @version 1.14.3.0 */ public class Directory extends NetObject { /** * Fully assembly qualified name: System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e */ public static final String assemblyFullName = "System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e"; /** * Assembly name: System.Private.CoreLib */ public static final String assemblyShortName = "System.Private.CoreLib"; /** * Qualified class name: System.IO.Directory */ public static final String className = "System.IO.Directory"; static JCOBridge bridge = JCOBridgeInstance.getInstance(assemblyFullName); /** * The type managed from JCOBridge. See {@link JCType} */ public static JCType classType = createType(); static JCEnum enumInstance = null; JCObject classInstance = null; static JCType createType() { try { String classToCreate = className + ", " + (JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); if (JCOReflector.getDebug()) JCOReflector.writeLog("Creating %s", classToCreate); JCType typeCreated = bridge.GetType(classToCreate); if (JCOReflector.getDebug()) JCOReflector.writeLog("Created: %s", (typeCreated != null) ? typeCreated.toString() : "Returned null value"); return typeCreated; } catch (JCException e) { JCOReflector.writeLog(e); return null; } } void addReference(String ref) throws Throwable { try { bridge.AddReference(ref); } catch (JCNativeException jcne) { throw translateException(jcne); } } /** * Internal constructor. Use with caution */ public Directory(java.lang.Object instance) throws Throwable { super(instance); if (instance instanceof JCObject) { classInstance = (JCObject) instance; } else throw new Exception("Cannot manage object, it is not a JCObject"); } public String getJCOAssemblyName() { return assemblyFullName; } public String getJCOClassName() { return className; } public String getJCOObjectName() { return className + ", " + (JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); } public java.lang.Object getJCOInstance() { return classInstance; } public void setJCOInstance(JCObject instance) { classInstance = instance; super.setJCOInstance(classInstance); } public JCType getJCOType() { return classType; } /** * Try to cast the {@link IJCOBridgeReflected} instance into {@link Directory}, a cast assert is made to check if types are compatible. * @param from {@link IJCOBridgeReflected} instance to be casted * @return {@link Directory} instance * @throws java.lang.Throwable in case of error during cast operation */ public static Directory cast(IJCOBridgeReflected from) throws Throwable { NetType.AssertCast(classType, from); return new Directory(from.getJCOInstance()); } // Constructors section public Directory() throws Throwable { } // Methods section public static boolean Exists(java.lang.String path) throws Throwable, system.ArgumentException, system.NotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.globalization.CultureNotFoundException, system.MethodAccessException, system.MissingMethodException, system.MemberAccessException, system.reflection.TargetInvocationException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { return (boolean)classType.Invoke("Exists", path); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static DateTime GetCreationTime(java.lang.String path) throws Throwable, system.NotSupportedException, system.ArgumentException, system.ArgumentNullException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.MissingMethodException, system.reflection.TargetInvocationException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objGetCreationTime = (JCObject)classType.Invoke("GetCreationTime", path); return new DateTime(objGetCreationTime); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static DateTime GetCreationTimeUtc(java.lang.String path) throws Throwable, system.NotSupportedException, system.ArgumentException, system.ArgumentNullException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.MissingMethodException, system.reflection.TargetInvocationException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objGetCreationTimeUtc = (JCObject)classType.Invoke("GetCreationTimeUtc", path); return new DateTime(objGetCreationTimeUtc); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static DateTime GetLastAccessTime(java.lang.String path) throws Throwable, system.NotSupportedException, system.ArgumentException, system.ArgumentNullException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.MissingMethodException, system.reflection.TargetInvocationException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objGetLastAccessTime = (JCObject)classType.Invoke("GetLastAccessTime", path); return new DateTime(objGetLastAccessTime); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static DateTime GetLastAccessTimeUtc(java.lang.String path) throws Throwable, system.NotSupportedException, system.ArgumentException, system.ArgumentNullException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.MissingMethodException, system.reflection.TargetInvocationException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objGetLastAccessTimeUtc = (JCObject)classType.Invoke("GetLastAccessTimeUtc", path); return new DateTime(objGetLastAccessTimeUtc); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static DateTime GetLastWriteTime(java.lang.String path) throws Throwable, system.NotSupportedException, system.ArgumentException, system.ArgumentNullException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.MissingMethodException, system.reflection.TargetInvocationException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objGetLastWriteTime = (JCObject)classType.Invoke("GetLastWriteTime", path); return new DateTime(objGetLastWriteTime); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static DateTime GetLastWriteTimeUtc(java.lang.String path) throws Throwable, system.NotSupportedException, system.ArgumentException, system.ArgumentNullException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.MissingMethodException, system.reflection.TargetInvocationException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objGetLastWriteTimeUtc = (JCObject)classType.Invoke("GetLastWriteTimeUtc", path); return new DateTime(objGetLastWriteTimeUtc); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static DirectoryInfo CreateDirectory(java.lang.String path, UnixFileMode unixCreateMode) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArrayTypeMismatchException, system.NotSupportedException, system.globalization.CultureNotFoundException, system.ObjectDisposedException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objCreateDirectory = (JCObject)classType.Invoke("CreateDirectory", path, unixCreateMode == null ? null : unixCreateMode.getJCOInstance()); return new DirectoryInfo(objCreateDirectory); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static DirectoryInfo CreateDirectory(java.lang.String path) throws Throwable, system.NotSupportedException, system.ArgumentException, system.ArgumentNullException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.globalization.CultureNotFoundException, system.MissingMethodException, system.reflection.TargetInvocationException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objCreateDirectory = (JCObject)classType.Invoke("CreateDirectory", path); return new DirectoryInfo(objCreateDirectory); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static DirectoryInfo CreateTempSubdirectory(java.lang.String prefix) throws Throwable, system.NotSupportedException, system.ArgumentException, system.InvalidOperationException, system.PlatformNotSupportedException, system.IndexOutOfRangeException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.FormatException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.globalization.CultureNotFoundException, system.io.IOException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objCreateTempSubdirectory = (JCObject)classType.Invoke("CreateTempSubdirectory", prefix); return new DirectoryInfo(objCreateTempSubdirectory); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static DirectoryInfo GetParent(java.lang.String path) throws Throwable, system.NotSupportedException, system.ArgumentException, system.ArgumentNullException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.globalization.CultureNotFoundException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objGetParent = (JCObject)classType.Invoke("GetParent", path); return new DirectoryInfo(objGetParent); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static FileSystemInfo CreateSymbolicLink(java.lang.String path, java.lang.String pathToTarget) throws Throwable, system.ArgumentException, system.NotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.globalization.CultureNotFoundException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objCreateSymbolicLink = (JCObject)classType.Invoke("CreateSymbolicLink", path, pathToTarget); return new FileSystemInfo(objCreateSymbolicLink); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static FileSystemInfo ResolveLinkTarget(java.lang.String linkPath, boolean returnFinalTarget) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.PlatformNotSupportedException, system.NotSupportedException, system.IndexOutOfRangeException, system.globalization.CultureNotFoundException, system.ArgumentOutOfRangeException, system.InvalidOperationException, system.OutOfMemoryException, system.MethodAccessException, system.MissingMethodException, system.MemberAccessException, system.reflection.TargetInvocationException, system.FormatException, system.ArrayTypeMismatchException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objResolveLinkTarget = (JCObject)classType.Invoke("ResolveLinkTarget", linkPath, returnFinalTarget); return new FileSystemInfo(objResolveLinkTarget); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static java.lang.String GetCurrentDirectory() throws Throwable, system.NotSupportedException, system.ArgumentException, system.InvalidOperationException, system.ArgumentNullException, system.PlatformNotSupportedException, system.FormatException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.globalization.CultureNotFoundException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { return (java.lang.String)classType.Invoke("GetCurrentDirectory"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static java.lang.String GetDirectoryRoot(java.lang.String path) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException, system.NotSupportedException, system.ObjectDisposedException, system.InvalidOperationException, system.RankException, system.ArrayTypeMismatchException, system.ArgumentNullException, system.IndexOutOfRangeException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.globalization.CultureNotFoundException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { return (java.lang.String)classType.Invoke("GetDirectoryRoot", path); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static java.lang.String[] GetDirectories(java.lang.String path, java.lang.String searchPattern, EnumerationOptions enumerationOptions) throws Throwable, system.ArgumentException, system.NotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.ArrayTypeMismatchException, system.OutOfMemoryException, system.globalization.CultureNotFoundException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { ArrayList resultingArrayList = new ArrayList(); JCObject resultingObjects = (JCObject)classType.Invoke("GetDirectories", path, searchPattern, enumerationOptions == null ? null : enumerationOptions.getJCOInstance()); for (java.lang.Object resultingObject : resultingObjects) { resultingArrayList.add(resultingObject); } java.lang.String[] resultingArray = new java.lang.String[resultingArrayList.size()]; for(int indexGetDirectories = 0; indexGetDirectories < resultingArrayList.size(); indexGetDirectories++ ) { resultingArray[indexGetDirectories] = (java.lang.String)resultingArrayList.get(indexGetDirectories); } return resultingArray; } catch (JCNativeException jcne) { throw translateException(jcne); } } public static java.lang.String[] GetDirectories(java.lang.String path, java.lang.String searchPattern, SearchOption searchOption) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArrayTypeMismatchException, system.NotSupportedException, system.globalization.CultureNotFoundException, system.ObjectDisposedException, system.IndexOutOfRangeException, system.OutOfMemoryException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { ArrayList resultingArrayList = new ArrayList(); JCObject resultingObjects = (JCObject)classType.Invoke("GetDirectories", path, searchPattern, searchOption == null ? null : searchOption.getJCOInstance()); for (java.lang.Object resultingObject : resultingObjects) { resultingArrayList.add(resultingObject); } java.lang.String[] resultingArray = new java.lang.String[resultingArrayList.size()]; for(int indexGetDirectories = 0; indexGetDirectories < resultingArrayList.size(); indexGetDirectories++ ) { resultingArray[indexGetDirectories] = (java.lang.String)resultingArrayList.get(indexGetDirectories); } return resultingArray; } catch (JCNativeException jcne) { throw translateException(jcne); } } public static java.lang.String[] GetDirectories(java.lang.String path, java.lang.String searchPattern) throws Throwable, system.NotSupportedException, system.ArgumentException, system.ArgumentNullException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.ArgumentOutOfRangeException, system.InvalidOperationException, system.OutOfMemoryException, system.RankException, system.ArrayTypeMismatchException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { ArrayList resultingArrayList = new ArrayList(); JCObject resultingObjects = (JCObject)classType.Invoke("GetDirectories", path, searchPattern); for (java.lang.Object resultingObject : resultingObjects) { resultingArrayList.add(resultingObject); } java.lang.String[] resultingArray = new java.lang.String[resultingArrayList.size()]; for(int indexGetDirectories = 0; indexGetDirectories < resultingArrayList.size(); indexGetDirectories++ ) { resultingArray[indexGetDirectories] = (java.lang.String)resultingArrayList.get(indexGetDirectories); } return resultingArray; } catch (JCNativeException jcne) { throw translateException(jcne); } } public static java.lang.String[] GetDirectories(java.lang.String path) throws Throwable, system.NotSupportedException, system.ArgumentException, system.ArgumentNullException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.ArgumentOutOfRangeException, system.InvalidOperationException, system.OutOfMemoryException, system.RankException, system.ArrayTypeMismatchException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { ArrayList resultingArrayList = new ArrayList(); JCObject resultingObjects = (JCObject)classType.Invoke("GetDirectories", path); for (java.lang.Object resultingObject : resultingObjects) { resultingArrayList.add(resultingObject); } java.lang.String[] resultingArray = new java.lang.String[resultingArrayList.size()]; for(int indexGetDirectories = 0; indexGetDirectories < resultingArrayList.size(); indexGetDirectories++ ) { resultingArray[indexGetDirectories] = (java.lang.String)resultingArrayList.get(indexGetDirectories); } return resultingArray; } catch (JCNativeException jcne) { throw translateException(jcne); } } public static java.lang.String[] GetFiles(java.lang.String path, java.lang.String searchPattern, EnumerationOptions enumerationOptions) throws Throwable, system.ArgumentException, system.NotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.ArrayTypeMismatchException, system.OutOfMemoryException, system.globalization.CultureNotFoundException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { ArrayList resultingArrayList = new ArrayList(); JCObject resultingObjects = (JCObject)classType.Invoke("GetFiles", path, searchPattern, enumerationOptions == null ? null : enumerationOptions.getJCOInstance()); for (java.lang.Object resultingObject : resultingObjects) { resultingArrayList.add(resultingObject); } java.lang.String[] resultingArray = new java.lang.String[resultingArrayList.size()]; for(int indexGetFiles = 0; indexGetFiles < resultingArrayList.size(); indexGetFiles++ ) { resultingArray[indexGetFiles] = (java.lang.String)resultingArrayList.get(indexGetFiles); } return resultingArray; } catch (JCNativeException jcne) { throw translateException(jcne); } } public static java.lang.String[] GetFiles(java.lang.String path, java.lang.String searchPattern, SearchOption searchOption) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArrayTypeMismatchException, system.NotSupportedException, system.globalization.CultureNotFoundException, system.ObjectDisposedException, system.IndexOutOfRangeException, system.OutOfMemoryException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { ArrayList resultingArrayList = new ArrayList(); JCObject resultingObjects = (JCObject)classType.Invoke("GetFiles", path, searchPattern, searchOption == null ? null : searchOption.getJCOInstance()); for (java.lang.Object resultingObject : resultingObjects) { resultingArrayList.add(resultingObject); } java.lang.String[] resultingArray = new java.lang.String[resultingArrayList.size()]; for(int indexGetFiles = 0; indexGetFiles < resultingArrayList.size(); indexGetFiles++ ) { resultingArray[indexGetFiles] = (java.lang.String)resultingArrayList.get(indexGetFiles); } return resultingArray; } catch (JCNativeException jcne) { throw translateException(jcne); } } public static java.lang.String[] GetFiles(java.lang.String path, java.lang.String searchPattern) throws Throwable, system.NotSupportedException, system.ArgumentException, system.ArgumentNullException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.ArgumentOutOfRangeException, system.InvalidOperationException, system.OutOfMemoryException, system.RankException, system.ArrayTypeMismatchException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { ArrayList resultingArrayList = new ArrayList(); JCObject resultingObjects = (JCObject)classType.Invoke("GetFiles", path, searchPattern); for (java.lang.Object resultingObject : resultingObjects) { resultingArrayList.add(resultingObject); } java.lang.String[] resultingArray = new java.lang.String[resultingArrayList.size()]; for(int indexGetFiles = 0; indexGetFiles < resultingArrayList.size(); indexGetFiles++ ) { resultingArray[indexGetFiles] = (java.lang.String)resultingArrayList.get(indexGetFiles); } return resultingArray; } catch (JCNativeException jcne) { throw translateException(jcne); } } public static java.lang.String[] GetFiles(java.lang.String path) throws Throwable, system.NotSupportedException, system.ArgumentException, system.ArgumentNullException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.ArgumentOutOfRangeException, system.InvalidOperationException, system.OutOfMemoryException, system.RankException, system.ArrayTypeMismatchException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { ArrayList resultingArrayList = new ArrayList(); JCObject resultingObjects = (JCObject)classType.Invoke("GetFiles", path); for (java.lang.Object resultingObject : resultingObjects) { resultingArrayList.add(resultingObject); } java.lang.String[] resultingArray = new java.lang.String[resultingArrayList.size()]; for(int indexGetFiles = 0; indexGetFiles < resultingArrayList.size(); indexGetFiles++ ) { resultingArray[indexGetFiles] = (java.lang.String)resultingArrayList.get(indexGetFiles); } return resultingArray; } catch (JCNativeException jcne) { throw translateException(jcne); } } public static java.lang.String[] GetFileSystemEntries(java.lang.String path, java.lang.String searchPattern, EnumerationOptions enumerationOptions) throws Throwable, system.ArgumentException, system.NotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.ArrayTypeMismatchException, system.OutOfMemoryException, system.globalization.CultureNotFoundException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { ArrayList resultingArrayList = new ArrayList(); JCObject resultingObjects = (JCObject)classType.Invoke("GetFileSystemEntries", path, searchPattern, enumerationOptions == null ? null : enumerationOptions.getJCOInstance()); for (java.lang.Object resultingObject : resultingObjects) { resultingArrayList.add(resultingObject); } java.lang.String[] resultingArray = new java.lang.String[resultingArrayList.size()]; for(int indexGetFileSystemEntries = 0; indexGetFileSystemEntries < resultingArrayList.size(); indexGetFileSystemEntries++ ) { resultingArray[indexGetFileSystemEntries] = (java.lang.String)resultingArrayList.get(indexGetFileSystemEntries); } return resultingArray; } catch (JCNativeException jcne) { throw translateException(jcne); } } public static java.lang.String[] GetFileSystemEntries(java.lang.String path, java.lang.String searchPattern, SearchOption searchOption) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArrayTypeMismatchException, system.NotSupportedException, system.globalization.CultureNotFoundException, system.ObjectDisposedException, system.IndexOutOfRangeException, system.OutOfMemoryException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { ArrayList resultingArrayList = new ArrayList(); JCObject resultingObjects = (JCObject)classType.Invoke("GetFileSystemEntries", path, searchPattern, searchOption == null ? null : searchOption.getJCOInstance()); for (java.lang.Object resultingObject : resultingObjects) { resultingArrayList.add(resultingObject); } java.lang.String[] resultingArray = new java.lang.String[resultingArrayList.size()]; for(int indexGetFileSystemEntries = 0; indexGetFileSystemEntries < resultingArrayList.size(); indexGetFileSystemEntries++ ) { resultingArray[indexGetFileSystemEntries] = (java.lang.String)resultingArrayList.get(indexGetFileSystemEntries); } return resultingArray; } catch (JCNativeException jcne) { throw translateException(jcne); } } public static java.lang.String[] GetFileSystemEntries(java.lang.String path, java.lang.String searchPattern) throws Throwable, system.NotSupportedException, system.ArgumentException, system.ArgumentNullException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.ArgumentOutOfRangeException, system.InvalidOperationException, system.OutOfMemoryException, system.RankException, system.ArrayTypeMismatchException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { ArrayList resultingArrayList = new ArrayList(); JCObject resultingObjects = (JCObject)classType.Invoke("GetFileSystemEntries", path, searchPattern); for (java.lang.Object resultingObject : resultingObjects) { resultingArrayList.add(resultingObject); } java.lang.String[] resultingArray = new java.lang.String[resultingArrayList.size()]; for(int indexGetFileSystemEntries = 0; indexGetFileSystemEntries < resultingArrayList.size(); indexGetFileSystemEntries++ ) { resultingArray[indexGetFileSystemEntries] = (java.lang.String)resultingArrayList.get(indexGetFileSystemEntries); } return resultingArray; } catch (JCNativeException jcne) { throw translateException(jcne); } } public static java.lang.String[] GetFileSystemEntries(java.lang.String path) throws Throwable, system.NotSupportedException, system.ArgumentException, system.ArgumentNullException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.ArgumentOutOfRangeException, system.InvalidOperationException, system.OutOfMemoryException, system.RankException, system.ArrayTypeMismatchException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { ArrayList resultingArrayList = new ArrayList(); JCObject resultingObjects = (JCObject)classType.Invoke("GetFileSystemEntries", path); for (java.lang.Object resultingObject : resultingObjects) { resultingArrayList.add(resultingObject); } java.lang.String[] resultingArray = new java.lang.String[resultingArrayList.size()]; for(int indexGetFileSystemEntries = 0; indexGetFileSystemEntries < resultingArrayList.size(); indexGetFileSystemEntries++ ) { resultingArray[indexGetFileSystemEntries] = (java.lang.String)resultingArrayList.get(indexGetFileSystemEntries); } return resultingArray; } catch (JCNativeException jcne) { throw translateException(jcne); } } public static java.lang.String[] GetLogicalDrives() throws Throwable, system.ArgumentException, system.NotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.OutOfMemoryException, system.PlatformNotSupportedException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { ArrayList resultingArrayList = new ArrayList(); JCObject resultingObjects = (JCObject)classType.Invoke("GetLogicalDrives"); for (java.lang.Object resultingObject : resultingObjects) { resultingArrayList.add(resultingObject); } java.lang.String[] resultingArray = new java.lang.String[resultingArrayList.size()]; for(int indexGetLogicalDrives = 0; indexGetLogicalDrives < resultingArrayList.size(); indexGetLogicalDrives++ ) { resultingArray[indexGetLogicalDrives] = (java.lang.String)resultingArrayList.get(indexGetLogicalDrives); } return resultingArray; } catch (JCNativeException jcne) { throw translateException(jcne); } } public static void Delete(java.lang.String path, boolean recursive) throws Throwable, system.ArgumentException, system.NotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.globalization.CultureNotFoundException, system.io.IOException, system.MethodAccessException, system.MissingMethodException, system.MemberAccessException, system.reflection.TargetInvocationException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { classType.Invoke("Delete", path, recursive); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static void Delete(java.lang.String path) throws Throwable, system.ArgumentException, system.NotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.globalization.CultureNotFoundException, system.io.IOException, system.MethodAccessException, system.MissingMethodException, system.MemberAccessException, system.reflection.TargetInvocationException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { classType.Invoke("Delete", path); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static void Move(java.lang.String sourceDirName, java.lang.String destDirName) throws Throwable, system.NotSupportedException, system.ArgumentException, system.ArgumentNullException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.globalization.CultureNotFoundException, system.io.IOException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { classType.Invoke("Move", sourceDirName, destDirName); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static void SetCreationTime(java.lang.String path, DateTime creationTime) throws Throwable, system.ArgumentException, system.NotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.globalization.CultureNotFoundException, system.InvalidTimeZoneException, system.security.SecurityException, system.UnauthorizedAccessException, system.io.IOException, system.OverflowException, system.MethodAccessException, system.MissingMethodException, system.MemberAccessException, system.reflection.TargetInvocationException, system.ObjectDisposedException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { classType.Invoke("SetCreationTime", path, creationTime == null ? null : creationTime.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static void SetCreationTimeUtc(java.lang.String path, DateTime creationTimeUtc) throws Throwable, system.ArgumentException, system.NotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.globalization.CultureNotFoundException, system.InvalidTimeZoneException, system.security.SecurityException, system.UnauthorizedAccessException, system.io.IOException, system.OverflowException, system.MethodAccessException, system.MissingMethodException, system.MemberAccessException, system.reflection.TargetInvocationException, system.ObjectDisposedException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { classType.Invoke("SetCreationTimeUtc", path, creationTimeUtc == null ? null : creationTimeUtc.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static void SetCurrentDirectory(java.lang.String path) throws Throwable, system.NotSupportedException, system.ArgumentException, system.ArgumentNullException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.globalization.CultureNotFoundException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { classType.Invoke("SetCurrentDirectory", path); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static void SetLastAccessTime(java.lang.String path, DateTime lastAccessTime) throws Throwable, system.ArgumentException, system.NotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.globalization.CultureNotFoundException, system.InvalidTimeZoneException, system.security.SecurityException, system.UnauthorizedAccessException, system.io.IOException, system.OverflowException, system.MethodAccessException, system.MissingMethodException, system.MemberAccessException, system.reflection.TargetInvocationException, system.ObjectDisposedException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { classType.Invoke("SetLastAccessTime", path, lastAccessTime == null ? null : lastAccessTime.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static void SetLastAccessTimeUtc(java.lang.String path, DateTime lastAccessTimeUtc) throws Throwable, system.ArgumentException, system.NotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.globalization.CultureNotFoundException, system.InvalidTimeZoneException, system.security.SecurityException, system.UnauthorizedAccessException, system.io.IOException, system.OverflowException, system.MethodAccessException, system.MissingMethodException, system.MemberAccessException, system.reflection.TargetInvocationException, system.ObjectDisposedException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { classType.Invoke("SetLastAccessTimeUtc", path, lastAccessTimeUtc == null ? null : lastAccessTimeUtc.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static void SetLastWriteTime(java.lang.String path, DateTime lastWriteTime) throws Throwable, system.ArgumentException, system.NotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.globalization.CultureNotFoundException, system.InvalidTimeZoneException, system.security.SecurityException, system.UnauthorizedAccessException, system.io.IOException, system.OverflowException, system.MethodAccessException, system.MissingMethodException, system.MemberAccessException, system.reflection.TargetInvocationException, system.ObjectDisposedException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { classType.Invoke("SetLastWriteTime", path, lastWriteTime == null ? null : lastWriteTime.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static void SetLastWriteTimeUtc(java.lang.String path, DateTime lastWriteTimeUtc) throws Throwable, system.ArgumentException, system.NotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.globalization.CultureNotFoundException, system.InvalidTimeZoneException, system.security.SecurityException, system.UnauthorizedAccessException, system.io.IOException, system.OverflowException, system.MethodAccessException, system.MissingMethodException, system.MemberAccessException, system.reflection.TargetInvocationException, system.ObjectDisposedException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { classType.Invoke("SetLastWriteTimeUtc", path, lastWriteTimeUtc == null ? null : lastWriteTimeUtc.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } // Properties section // Instance Events section }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy