~ubuntu-branches/ubuntu/lucid/webkit/lucid-updates

« back to all changes in this revision

Viewing changes to WebCore/html/File.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Gustavo Noronha Silva
  • Date: 2010-02-04 19:30:57 UTC
  • mfrom: (1.2.8 upstream) (4.3.9 sid)
  • Revision ID: james.westby@ubuntu.com-20100204193057-d3018lm1fipb0703
* New upstream release
* debian/copyright:
- Updated with changes since 1.1.19.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
#include "File.h"
28
28
 
29
29
#include "FileSystem.h"
30
 
#include "PlatformString.h"
31
30
 
32
31
namespace WebCore {
33
32
 
34
33
File::File(const String& path)
35
 
    : m_path(path)
36
 
    , m_fileName(pathGetFileName(path))
37
 
{
38
 
}
39
 
 
40
 
unsigned long long File::fileSize()
41
 
{
42
 
    // FIXME: Should we cache this?
43
 
    // FIXME: JavaScript cannot represent sizes as large as unsigned long long, we need to
44
 
    // come up with an exception to throw if file size is not represetable.
45
 
    long long size;
46
 
    if (!getFileSize(m_path, size))
47
 
        return 0;
48
 
    return size;
 
34
    : Blob(path)
 
35
    , m_name(pathGetFileName(path))
 
36
{
49
37
}
50
38
 
51
39
} // namespace WebCore