private Truncate ( ConversionStorage |
||
toPath | ConversionStorage |
|
self | ||
path | object | |
size | [ | |
return | int |
public static int Truncate(ConversionStorage<MutableString>/*!*/ toPath, RubyClass/*!*/ self, object path, [DefaultProtocol]int size) {
if (size < 0) {
throw new InvalidError();
}
using (RubyFile f = new RubyFile(self.Context, self.Context.DecodePath(Protocols.CastToPath(toPath, path)), IOMode.ReadWrite)) {
f.Length = size;
}
return 0;
}
#endif
RubyFileOps::Truncate ( IronRuby.Builtins.RubyFile self, [ size ) : int |