@@ -67,15 +67,6 @@ def __idiv__(self, path):
67
67
68
68
__itruediv__ = __idiv__
69
69
70
- def __floordiv__ (self , paths ):
71
- """
72
- Returns a list of paths prefixed with 'self'.
73
-
74
- >>> '/home/a' // [bc.d, ef.g]
75
- [/home/a/bc.d, /home/a/ef.g]
76
- """
77
- return [Path (self , path ) for path in paths ]
78
-
79
70
def __sub__ (self , path ):
80
71
"""
81
72
Makes this path relative to another path.
@@ -125,14 +116,7 @@ def namebase(self):
125
116
"""
126
117
'/home/a/bc.d' -> 'bc'
127
118
"""
128
- return self .noext .name
129
-
130
- @property
131
- def noext (self ):
132
- """
133
- '/home/a/bc.d' -> '/home/a/bc'
134
- """
135
- return Path (os .path .splitext (self )[0 ])
119
+ return Path (os .path .splitext (self )[0 ]).name
136
120
137
121
@property
138
122
def ext (self ):
@@ -162,13 +146,6 @@ def normpath(self):
162
146
"""
163
147
return Path (os .path .normpath (self ))
164
148
165
- @property
166
- def normcase (self ):
167
- """
168
- Deals with case-insensitive filesystems
169
- """
170
- return Path (os .path .normcase (self ))
171
-
172
149
@property
173
150
def folder (self ):
174
151
"""
@@ -187,38 +164,6 @@ def exists(self):
187
164
"""
188
165
return os .path .exists (self )
189
166
190
- @property
191
- def atime (self ):
192
- """
193
- Returns last accessed time.
194
- """
195
- return os .path .getatime (self )
196
-
197
- @property
198
- def mtime (self ):
199
- """
200
- Returns last modified time.
201
- """
202
- return os .path .getmtime (self )
203
-
204
- @property
205
- def ctime (self ):
206
- """
207
- Returns last changed time.
208
- """
209
- return os .path .getctime (self )
210
-
211
- @classmethod
212
- def supports_unicode (self ):
213
- """
214
- Returns True if the system can handle Unicode file names.
215
- """
216
- return os .path .supports_unicode_filenames ()
217
-
218
- def walk (self , ** kwargs ):
219
- """ Returns a generator that walks through a directory tree. """
220
- return os .walk (self , ** kwargs )
221
-
222
167
def mkdir (self , mode = 0x1FF ): # 0o777
223
168
"""
224
169
Creates a directory, if it doesn't exist already.
@@ -276,9 +221,6 @@ def rename(self, to):
276
221
"""
277
222
return os .rename (self , to )
278
223
279
- def renames (self , to ):
280
- return os .renames (self , to )
281
-
282
224
def glob (self , pattern ):
283
225
return (Path (i ) for i in glob .iglob (self .join (pattern )))
284
226
0 commit comments