11from typing import Any , Iterator , List , Optional , Set , Union
22
33from dev .coatl .helper .types import AnyStr
4- from java .io import BufferedReader , BufferedWriter , InputStream , OutputStream
5- from java .lang import AutoCloseable , CharSequence , Class , Enum , Object
4+ from java .io import (
5+ BufferedReader ,
6+ BufferedWriter ,
7+ InputStream ,
8+ IOException ,
9+ OutputStream ,
10+ )
11+ from java .lang import (
12+ AutoCloseable ,
13+ CharSequence ,
14+ Class ,
15+ Enum ,
16+ IllegalArgumentException ,
17+ IllegalStateException ,
18+ Object ,
19+ RuntimeException ,
20+ Throwable ,
21+ UnsupportedOperationException ,
22+ )
623from java .nio .channels import SeekableByteChannel
724from java .nio .charset import Charset
825from java .nio .file .attribute import (
@@ -14,6 +31,7 @@ from java.nio.file.attribute import (
1431 PosixFilePermission ,
1532 UserPrincipal ,
1633)
34+ from java .util import ConcurrentModificationException
1735from java .util .function import BiPredicate
1836from java .util .stream import Stream
1937
@@ -39,6 +57,76 @@ class FileStore(Object):
3957 def supportsFileAttributeView (self , type : Class ) -> bool : ...
4058 def type (self ) -> AnyStr : ...
4159
60+ class ClosedDirectoryStreamException (IllegalStateException ):
61+ def __init__ (self ) -> None : ...
62+
63+ class ClosedFileSystemException (IllegalStateException ):
64+ def __init__ (self ) -> None : ...
65+
66+ class DirectoryIteratorException (ConcurrentModificationException ):
67+ def __init__ (self , cause : Throwable ) -> None : ...
68+
69+ class FileSystemAlreadyExistsException (RuntimeException ):
70+ def __init__ (self , message : Optional [str ] = ...) -> None : ...
71+
72+ class FileSystemException (IOException ):
73+ def __init__ (
74+ self ,
75+ file : AnyStr ,
76+ other : Optional [AnyStr ] = ...,
77+ reason : Optional [AnyStr ] = ...,
78+ ) -> None : ...
79+ def getFile (self ) -> AnyStr : ...
80+ def getOtherFile (self ) -> Optional [AnyStr ]: ...
81+ def getReason (self ) -> Optional [AnyStr ]: ...
82+
83+ class AccessDeniedException (FileSystemException ):
84+ def __init__ (
85+ self ,
86+ file : AnyStr ,
87+ other : Optional [AnyStr ] = ...,
88+ reason : Optional [AnyStr ] = ...,
89+ ) -> None : ...
90+
91+ class AtomicMoveNotSupportedException (FileSystemException ):
92+ def __init__ (self , source : AnyStr , target : AnyStr , reason : AnyStr ) -> None : ...
93+
94+ class DirectoryNotEmptyException (FileSystemException ):
95+ def __init__ (self , dir_ : AnyStr ) -> None : ...
96+
97+ class FileAlreadyExistsException (FileSystemException ):
98+ def __init__ (
99+ self ,
100+ file : AnyStr ,
101+ other : Optional [AnyStr ] = ...,
102+ reason : Optional [AnyStr ] = ...,
103+ ) -> None : ...
104+
105+ class FileSystemLoopException (FileSystemException ):
106+ def __init__ (self , file : AnyStr ) -> None : ...
107+
108+ class FileSystemNotFoundException (RuntimeException ):
109+ def __init__ (self , message : Optional [str ] = ...) -> None : ...
110+
111+ class NoSuchFileException (FileSystemException ):
112+ def __init__ (
113+ self ,
114+ file : AnyStr ,
115+ other : Optional [AnyStr ] = ...,
116+ reason : Optional [AnyStr ] = ...,
117+ ) -> None : ...
118+
119+ class NotDirectoryException (FileSystemException ):
120+ def __init__ (self , file : AnyStr ) -> None : ...
121+
122+ class NotLinkException (FileSystemException ):
123+ def __init__ (
124+ self ,
125+ file : AnyStr ,
126+ other : Optional [AnyStr ] = ...,
127+ reason : Optional [AnyStr ] = ...,
128+ ) -> None : ...
129+
42130class FileVisitOption (Enum ):
43131 FOLLOW_LINKS : FileVisitOption
44132 @staticmethod
@@ -160,6 +248,12 @@ class Files(Object):
160248 @staticmethod
161249 def writeString (path : Path , csq : CharSequence , * args : Any ) -> Path : ...
162250
251+ class InvalidPathException (IllegalArgumentException ):
252+ def __init__ (self , input : str , reason : str , index : Optional [int ] = ...) -> None : ...
253+ def getIndex (self ) -> Optional [int ]: ...
254+ def getInput (self ) -> AnyStr : ...
255+ def getReason (self ) -> AnyStr : ...
256+
163257class LinkOption (Enum , CopyOption , OpenOption ):
164258 NOFOLLOW_LINKS : LinkOption
165259 @staticmethod
@@ -196,6 +290,9 @@ class Paths(Object):
196290 @staticmethod
197291 def get (* args : Any ) -> Path : ...
198292
293+ class ReadOnlyFileSystemException (UnsupportedOperationException ):
294+ def __init__ (self ) -> None : ...
295+
199296class StandardCopyOption (Enum , CopyOption , OpenOption ):
200297 ATOMIC_MOVE : StandardCopyOption
201298 COPY_ATTRIBUTES : StandardCopyOption
0 commit comments