public static function getFileSystem()
    {
        if (self::$fs === null) {
            switch (Phing::getProperty('host.fstype')) {
                case 'UNIX':
                    self::$fs = new UnixFileSystem();
                    break;
                case 'WINDOWS':
                    self::$fs = new WindowsFileSystem();
                    break;
                default:
                    throw new IOException("Host uses unsupported filesystem, unable to proceed");
            }
        }

        return self::$fs;
    }