Skip to content

Commit

Permalink
SplFileInfo::getSize()
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubmisek committed Mar 31, 2019
1 parent cc76e7d commit e6c3f0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Peachpie.Library/Spl/SplFileInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ public virtual string getExtension()
public virtual string getPathname() => _fullpath;
public virtual long getPerms() { throw new NotImplementedException(); }

[return:CastToFalse]
[return: CastToFalse]
public virtual string getRealPath(Context ctx) => ResolvedInfo.FullName;

public virtual long getSize() { throw new NotImplementedException(); }
public virtual long getSize() => (ResolvedInfo is FileInfo finfo) ? finfo.Length : 0;
public virtual string getType() { throw new NotImplementedException(); }
public virtual bool isDir() => ResolvedInfo.Exists && ResolvedInfo is DirectoryInfo;
public virtual bool isExecutable() { throw new NotImplementedException(); }
Expand Down

0 comments on commit e6c3f0e

Please # to comment.